Fix #11775.
BitmapDrawingEngine: - Check if fBitmap is NULL before releasing its reference. Since this is the case when a BitmapDrawingEngine is instantiated, this would lead to an app_server crash upon any attempt to make use of one.
This commit is contained in:
@@ -48,7 +48,7 @@ BitmapDrawingEngine::SetSize(int32 newWidth, int32 newHeight)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetHWInterface(NULL);
|
SetHWInterface(NULL);
|
||||||
if (fHWInterface) {
|
if (fHWInterface != NULL) {
|
||||||
fHWInterface->LockExclusiveAccess();
|
fHWInterface->LockExclusiveAccess();
|
||||||
fHWInterface->Shutdown();
|
fHWInterface->Shutdown();
|
||||||
fHWInterface->UnlockExclusiveAccess();
|
fHWInterface->UnlockExclusiveAccess();
|
||||||
@@ -56,8 +56,10 @@ BitmapDrawingEngine::SetSize(int32 newWidth, int32 newHeight)
|
|||||||
fHWInterface = NULL;
|
fHWInterface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
fBitmap->ReleaseReference();
|
if (fBitmap != NULL) {
|
||||||
fBitmap = NULL;
|
fBitmap->ReleaseReference();
|
||||||
|
fBitmap = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (newWidth <= 0 || newHeight <= 0)
|
if (newWidth <= 0 || newHeight <= 0)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user