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:
Artur Wyszynski
2010-02-08 22:50:38 +00:00
parent c0cd8cf199
commit cee04e8074
54 changed files with 153 additions and 126 deletions
+2 -2
View File
@@ -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);