commit b81463986281f8f73dd6c99ac1b402cffa734138
Author: Stephan Witt <[email protected]>
Date:   Sat Jul 4 18:59:29 2015 +0200

    Fix for #9659 - Qt may send more then one close event to a window. 
Therefore multiple calls to unregisterView for a GuiView are possible. The 
first one removes the view from the list of known views, subsequent calls do 
nothing.
    (cherry picked from commit 8a772549d7def2c11598ed1ed6e5c510c68e2edd)

diff --git a/src/frontends/qt4/GuiApplication.cpp 
b/src/frontends/qt4/GuiApplication.cpp
index cf359d6..71df9bf 100644
--- a/src/frontends/qt4/GuiApplication.cpp
+++ b/src/frontends/qt4/GuiApplication.cpp
@@ -2660,10 +2660,11 @@ void GuiApplication::commitData(QSessionManager & sm)
 
 void GuiApplication::unregisterView(GuiView * gv)
 {
-       LAPPERR(d->views_[gv->id()] == gv);
-       d->views_.remove(gv->id());
-       if (current_view_ == gv)
-               current_view_ = 0;
+       if(d->views_.contains(gv->id()) && d->views_.value(gv->id()) == gv) {
+               d->views_.remove(gv->id());
+               if (current_view_ == gv)
+                       current_view_ = 0;
+       }
 }
 
 
diff --git a/status.21x b/status.21x
index dfb4ccb..306fa6b 100644
--- a/status.21x
+++ b/status.21x
@@ -260,6 +260,7 @@ What's new
 
 - Don't repeatedly check for missing programs when reconfiguring.
 
+- Backport of the fix for bug 9659 from master.
 
 
 * DOCUMENTATION AND LOCALIZATION

Reply via email to