]> git.lyx.org Git - lyx.git/commitdiff
Fix for #9659 - Qt may send more then one close event to a window. Therefore multiple...
authorStephan Witt <switt@lyx.org>
Sat, 4 Jul 2015 16:59:29 +0000 (18:59 +0200)
committerStephan Witt <switt@lyx.org>
Sat, 4 Jul 2015 16:59:29 +0000 (18:59 +0200)
src/frontends/qt4/GuiApplication.cpp

index 8bd22c8c0385134b495e7ca234e05871047199e2..fc96995968005ed42e4c13bdf771a82278cbf861 100644 (file)
@@ -2735,10 +2735,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;
+       }
 }