deskbar Fix PVS V595

Add NULL check for 'fBarView', since it might be NULL
at line 107.

Change-Id: I293e551dd4ab6ac33b7d4a6d1bf736bcd142cb80
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2170
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Murai Takashi
2020-01-31 11:49:51 +00:00
committed by Jérôme Duval
parent f67a677986
commit 6a27de893b
+11 -9
View File
@@ -96,16 +96,18 @@ TTeamMenuItem::~TTeamMenuItem()
status_t
TTeamMenuItem::Invoke(BMessage* message)
{
if (fBarView->InvokeItem(Signature())) {
// handles drop on application
return B_OK;
}
if (fBarView != NULL) {
if (fBarView->InvokeItem(Signature())) {
// handles drop on application
return B_OK;
}
// if the app could not handle the drag message
// and we were dragging, then kill the drag
// should never get here, disabled item will not invoke
if (fBarView != NULL && fBarView->Dragging())
fBarView->DragStop();
// if the app could not handle the drag message
// and we were dragging, then kill the drag
// should never get here, disabled item will not invoke
if (fBarView->Dragging())
fBarView->DragStop();
}
// bring to front or minimize shortcuts
uint32 mods = modifiers();