Tracker: Replace an instance of static_cast with dynamic_cast
No fundamental change here, Tracker might be used as a kit and this will fail as be_app is not Tracker. Change-Id: I1e2d8e143e996c008cd03771d34f20198d8109c8 Reviewed-on: https://review.haiku-os.org/c/haiku/+/9577 Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
2a70c45937
commit
2ff08f46cb
@@ -1106,7 +1106,9 @@ TShortcuts::UpdateEmptyTrashItem(BMenuItem* item)
|
||||
return;
|
||||
|
||||
if (fInWindow) {
|
||||
item->SetEnabled(static_cast<TTracker*>(be_app)->TrashFull());
|
||||
TTracker* tracker = dynamic_cast<TTracker*>(be_app);
|
||||
if (tracker != NULL)
|
||||
item->SetEnabled(tracker->TrashFull());
|
||||
item->SetTarget(PoseView());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user