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
@@ -477,7 +477,7 @@ private:
|
||||
|
||||
try {
|
||||
fImages[sharedImage->Name()] = sharedImage;
|
||||
} catch (std::bad_alloc) {
|
||||
} catch (std::bad_alloc&) {
|
||||
return B_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user