From e86c01713fe61e774af2b065dfed706cd6bdeec9 Mon Sep 17 00:00:00 2001 From: san Date: Fri, 30 Sep 2011 10:37:37 +0000 Subject: [PATCH] Bug: Crash if user close current window through shortcut during displayed context menu. Fix: Used QPointer for QMenu and QMenu reparented to current window. --- src/Qtx/QtxWorkstack.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Qtx/QtxWorkstack.cxx b/src/Qtx/QtxWorkstack.cxx index b4940a458..32f94631a 100644 --- a/src/Qtx/QtxWorkstack.cxx +++ b/src/Qtx/QtxWorkstack.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -2539,7 +2540,7 @@ void QtxWorkstack::onContextMenuRequested( QWidget* w, QPoint p ) myWorkWin = w; myWorkArea = anArea; - QMenu* pm = new QMenu(); + QPointer pm = new QMenu( myWorkWin ); if ( lst.count() > 1 ) { -- 2.39.2