Fixed various errors/warnings reported by cppcheck:
* memory leaks * resource leaks * added const's to getters * removed a few reundant conditions git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -409,8 +409,8 @@ void
|
||||
OffscreenBitmap::NewBitmap(BRect bounds)
|
||||
{
|
||||
delete fBitmap;
|
||||
fBitmap = new BBitmap(bounds, B_RGB32, true);
|
||||
if (fBitmap->Lock()) {
|
||||
fBitmap = new(std::nothrow) BBitmap(bounds, B_RGB32, true);
|
||||
if (fBitmap && fBitmap->Lock()) {
|
||||
BView *view = new BView(fBitmap->Bounds(), "", B_FOLLOW_NONE, 0);
|
||||
fBitmap->AddChild(view);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user