mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
check if the caused popup widget is null before qobject_cast<T>()-ing it
fixes crash on FreeBSD Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
a435ce9889
commit
f4dc49f06a
1 changed files with 5 additions and 3 deletions
|
@ -445,9 +445,11 @@ void QMenuPrivate::setCurrentAction(QAction *action, int popup, SelectionReason
|
|||
// Reselect the currently active action in case mouse moved over other menu items when
|
||||
// moving from sub menu action to sub menu (QTBUG-20094).
|
||||
if (reason != SelectedFromKeyboard && action == currentAction && !(action && action->menu() && action->menu() != activeMenu)) {
|
||||
if (QMenu *menu = qobject_cast<QMenu*>(causedPopup.widget)) {
|
||||
if (causedPopup.action && menu->d_func()->activeMenu == q)
|
||||
menu->d_func()->setCurrentAction(causedPopup.action, 0, reason, false);
|
||||
if (causedPopup.widget) {
|
||||
if (QMenu *menu = qobject_cast<QMenu*>(causedPopup.widget)) {
|
||||
if (causedPopup.action && menu->d_func()->activeMenu == q)
|
||||
menu->d_func()->setCurrentAction(causedPopup.action, 0, reason, false);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue