Fix catching polymorphic type by value
Replace catching polymorphic type std::bad_alloc 'by value' with 'by reference'. Pointed by gcc8
This commit is contained in:
committed by
Adrien Destugues
parent
c7c3973e09
commit
b08627f310
@@ -1423,7 +1423,7 @@ ActivityView::_DrawHistory(bool drawBackground)
|
||||
prev.Set(x, y);
|
||||
}
|
||||
|
||||
} catch (std::bad_alloc) {
|
||||
} catch (std::bad_alloc&) {
|
||||
// Not enough memory to allocate the line array.
|
||||
// TODO we could try to draw using the slower but less memory
|
||||
// consuming solution using StrokeLine.
|
||||
|
||||
Reference in New Issue
Block a user