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:
committed by
Jérôme Duval
parent
f67a677986
commit
6a27de893b
@@ -96,16 +96,18 @@ TTeamMenuItem::~TTeamMenuItem()
|
|||||||
status_t
|
status_t
|
||||||
TTeamMenuItem::Invoke(BMessage* message)
|
TTeamMenuItem::Invoke(BMessage* message)
|
||||||
{
|
{
|
||||||
if (fBarView->InvokeItem(Signature())) {
|
if (fBarView != NULL) {
|
||||||
// handles drop on application
|
if (fBarView->InvokeItem(Signature())) {
|
||||||
return B_OK;
|
// handles drop on application
|
||||||
}
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
// if the app could not handle the drag message
|
// if the app could not handle the drag message
|
||||||
// and we were dragging, then kill the drag
|
// and we were dragging, then kill the drag
|
||||||
// should never get here, disabled item will not invoke
|
// should never get here, disabled item will not invoke
|
||||||
if (fBarView != NULL && fBarView->Dragging())
|
if (fBarView->Dragging())
|
||||||
fBarView->DragStop();
|
fBarView->DragStop();
|
||||||
|
}
|
||||||
|
|
||||||
// bring to front or minimize shortcuts
|
// bring to front or minimize shortcuts
|
||||||
uint32 mods = modifiers();
|
uint32 mods = modifiers();
|
||||||
|
|||||||
Reference in New Issue
Block a user