* fDragBitmap was never initialized, leading to occasional crashes after the
first mouse click. * Minor cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25155 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
d092f4d8df
commit
c4d143146c
@ -239,6 +239,7 @@ EventDispatcher::EventDispatcher()
|
|||||||
fNextLatestMouseMoved(NULL),
|
fNextLatestMouseMoved(NULL),
|
||||||
fLastButtons(0),
|
fLastButtons(0),
|
||||||
fLastUpdate(system_time()),
|
fLastUpdate(system_time()),
|
||||||
|
fDragBitmap(NULL),
|
||||||
fCursorLock("cursor loop lock"),
|
fCursorLock("cursor loop lock"),
|
||||||
fHWInterface(NULL),
|
fHWInterface(NULL),
|
||||||
fDesktop(NULL)
|
fDesktop(NULL)
|
||||||
@ -568,10 +569,9 @@ EventDispatcher::SetDragMessage(BMessage& message,
|
|||||||
if (fDragBitmap != bitmap) {
|
if (fDragBitmap != bitmap) {
|
||||||
if (fDragBitmap)
|
if (fDragBitmap)
|
||||||
gBitmapManager->DeleteBitmap(fDragBitmap);
|
gBitmapManager->DeleteBitmap(fDragBitmap);
|
||||||
|
|
||||||
fDragBitmap = bitmap;
|
fDragBitmap = bitmap;
|
||||||
|
|
||||||
if (fDragBitmap)
|
if (fDragBitmap != NULL)
|
||||||
fDragBitmap->Acquire();
|
fDragBitmap->Acquire();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -705,8 +705,7 @@ EventDispatcher::_DeliverDragMessage()
|
|||||||
fDraggingMessage = false;
|
fDraggingMessage = false;
|
||||||
|
|
||||||
fHWInterface->SetDragBitmap(NULL, B_ORIGIN);
|
fHWInterface->SetDragBitmap(NULL, B_ORIGIN);
|
||||||
if (fDragBitmap)
|
gBitmapManager->DeleteBitmap(fDragBitmap);
|
||||||
gBitmapManager->DeleteBitmap(fDragBitmap);
|
|
||||||
fDragBitmap = NULL;
|
fDragBitmap = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user