CID 1761 : Dereferencing a potentially NULL pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37953 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -133,9 +133,14 @@ Utility::MakeScreenshot(bool includeMouse, bool activeWindow,
|
|||||||
if (wholeScreen == NULL)
|
if (wholeScreen == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
BRect bounds = cursorBitmap->Bounds();
|
int cursorWidth = 0;
|
||||||
int cursorWidth = bounds.IntegerWidth() + 1;
|
int cursorHeight = 0;
|
||||||
int cursorHeight = bounds.IntegerHeight() + 1;
|
|
||||||
|
if (cursorBitmap != NULL) {
|
||||||
|
BRect bounds = cursorBitmap->Bounds();
|
||||||
|
cursorWidth = bounds.IntegerWidth() + 1;
|
||||||
|
cursorHeight = bounds.IntegerHeight() + 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (includeMouse && cursorBitmap != NULL) {
|
if (includeMouse && cursorBitmap != NULL) {
|
||||||
// Import the cursor bitmap into wholeScreen
|
// Import the cursor bitmap into wholeScreen
|
||||||
|
|||||||
Reference in New Issue
Block a user