diff --git a/src/apps/launchbox/IconButton.cpp b/src/apps/launchbox/IconButton.cpp index 810003f4ab..04871ca623 100644 --- a/src/apps/launchbox/IconButton.cpp +++ b/src/apps/launchbox/IconButton.cpp @@ -461,9 +461,9 @@ IconButton::SetIcon(const unsigned char* bitsFromQuickRes, // colorspace needs conversion BBitmap* bitmap = new(nothrow) BBitmap(quickResBitmap->Bounds(), B_RGB32, true); if (bitmap && bitmap->IsValid()) { - BView* helper = new BView(bitmap->Bounds(), "helper", - B_FOLLOW_NONE, B_WILL_DRAW); if (bitmap->Lock()) { + BView* helper = new BView(bitmap->Bounds(), "helper", + B_FOLLOW_NONE, B_WILL_DRAW); bitmap->AddChild(helper); helper->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR)); helper->FillRect(helper->Bounds()); @@ -630,9 +630,9 @@ IconButton::_ConvertToRGB32(const BBitmap* bitmap) const B_BITMAP_ACCEPTS_VIEWS, B_RGBA32); if (convertedBitmap && convertedBitmap->IsValid()) { memset(convertedBitmap->Bits(), 0, convertedBitmap->BitsLength()); - BView* helper = new BView(bitmap->Bounds(), "helper", - B_FOLLOW_NONE, B_WILL_DRAW); if (convertedBitmap->Lock()) { + BView* helper = new BView(bitmap->Bounds(), "helper", + B_FOLLOW_NONE, B_WILL_DRAW); convertedBitmap->AddChild(helper); helper->SetDrawingMode(B_OP_OVER); helper->DrawBitmap(bitmap, BPoint(0.0, 0.0));