]> git.lyx.org Git - features.git/blobdiff - src/frontends/qt4/GuiApplication.cpp
* reset current_view_ when deleting a GuiView.
[features.git] / src / frontends / qt4 / GuiApplication.cpp
index 9b6e1f6e37de14ee1c58e24761c5adf22675a535..6606ec195e7f14dfcd9e15634974bb08ac2795aa 100644 (file)
@@ -296,7 +296,8 @@ bool GuiApplication::dispatch(FuncRequest const & cmd)
        case LFUN_LYX_QUIT:
                // quitting is triggered by the gui code
                // (leaving the event loop).
-               current_view_->message(from_utf8(N_("Exiting.")));
+               if (current_view_)
+                       current_view_->message(from_utf8(N_("Exiting.")));
                if (closeAllViews())
                        quit();
                break;
@@ -421,7 +422,7 @@ void GuiApplication::createView(QString const & geometry_arg, bool autoShow)
 #endif
        }
        view->setFocus();
-       setCurrentView(*view);
+       setCurrentView(view);
 }