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)
|
||||
return NULL;
|
||||
|
||||
BRect bounds = cursorBitmap->Bounds();
|
||||
int cursorWidth = bounds.IntegerWidth() + 1;
|
||||
int cursorHeight = bounds.IntegerHeight() + 1;
|
||||
int cursorWidth = 0;
|
||||
int cursorHeight = 0;
|
||||
|
||||
if (cursorBitmap != NULL) {
|
||||
BRect bounds = cursorBitmap->Bounds();
|
||||
cursorWidth = bounds.IntegerWidth() + 1;
|
||||
cursorHeight = bounds.IntegerHeight() + 1;
|
||||
}
|
||||
|
||||
if (includeMouse && cursorBitmap != NULL) {
|
||||
// Import the cursor bitmap into wholeScreen
|
||||
|
||||
Reference in New Issue
Block a user