deskbar: Fix PVS V757
Use dynamic_cast to menuItem after NULL checking to it. Change-Id: I3fdabf5a091922587f498cf5fa116f8824bbfc6b Reviewed-on: https://review.haiku-os.org/c/haiku/+/2160 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
250b21a583
commit
5529e8d2df
@ -351,8 +351,6 @@ TExpandoMenuBar::MouseMoved(BPoint where, uint32 code, const BMessage* message)
|
||||
{
|
||||
BMenuItem* menuItem;
|
||||
TTeamMenuItem* item = TeamItemAtPoint(where, &menuItem);
|
||||
TWindowMenuItem* windowMenuItem
|
||||
= dynamic_cast<TWindowMenuItem*>(menuItem);
|
||||
|
||||
if (item == NULL || menuItem == NULL) {
|
||||
// item is NULL, remove the tooltip and break out
|
||||
@ -366,6 +364,9 @@ TExpandoMenuBar::MouseMoved(BPoint where, uint32 code, const BMessage* message)
|
||||
break;
|
||||
}
|
||||
|
||||
TWindowMenuItem* windowMenuItem
|
||||
= dynamic_cast<TWindowMenuItem*>(menuItem);
|
||||
|
||||
if (windowMenuItem != NULL && fBarView->Vertical()
|
||||
&& fBarView->ExpandoState() && item->IsExpanded()) {
|
||||
// expando mode window menu item
|
||||
|
Loading…
Reference in New Issue
Block a user