diff --git a/src/apps/deskbar/TeamMenuItem.cpp b/src/apps/deskbar/TeamMenuItem.cpp index 6fcecd8a56..1c1fd1f740 100644 --- a/src/apps/deskbar/TeamMenuItem.cpp +++ b/src/apps/deskbar/TeamMenuItem.cpp @@ -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();