Now BBitmap creates a BWindow in case it can accept views. This avoids a crash in the 'DragMe' sample app.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12870 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
19e4729202
commit
e29cd74b0d
@ -777,6 +777,7 @@ BBitmap::BBitmap(const BBitmap *source, bool acceptsViews,
|
|||||||
*/
|
*/
|
||||||
BBitmap::~BBitmap()
|
BBitmap::~BBitmap()
|
||||||
{
|
{
|
||||||
|
delete fWindow;
|
||||||
CleanUp();
|
CleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2292,10 +2293,16 @@ BBitmap::InitObject(BRect bounds, color_space colorSpace, uint32 flags,
|
|||||||
fOrigArea = -1;
|
fOrigArea = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fInitError = error;
|
||||||
// TODO: on success, handle clearing to white if the flags say so. Needs to be
|
// TODO: on success, handle clearing to white if the flags say so. Needs to be
|
||||||
// dependent on color space.
|
// dependent on color space.
|
||||||
|
|
||||||
fInitError = error;
|
if (fInitError == B_OK) {
|
||||||
|
if (flags & B_BITMAP_ACCEPTS_VIEWS) {
|
||||||
|
// TODO: this probably needs to be a special kind of BWindow
|
||||||
|
fWindow = new BWindow(Bounds(), "offscreen window", B_UNTYPED_WINDOW, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// CleanUp
|
// CleanUp
|
||||||
|
Loading…
Reference in New Issue
Block a user