]> git.lyx.org Git - lyx.git/commitdiff
Get rid of a Qt-generated stderr message
authorScott Kostyshak <skostysh@lyx.org>
Tue, 11 Sep 2012 03:18:22 +0000 (23:18 -0400)
committerScott Kostyshak <skostysh@lyx.org>
Tue, 11 Sep 2012 03:18:22 +0000 (23:18 -0400)
The stderr message "Object::disconnect: Unexpected null parameter"
often appeared when closing and opening buffers.
GuiView::on_currentWorkAreaChanged should not pass a null pointer
to Object::disconnect.

src/frontends/qt4/GuiView.cpp

index b460413612252e248550c2334a2814f154dca461..fe69318f990d208d3eb7a1f1090bcccb9b984df2 100644 (file)
@@ -1022,8 +1022,9 @@ void GuiView::updateWindowTitle(GuiWorkArea * wa)
 
 void GuiView::on_currentWorkAreaChanged(GuiWorkArea * wa)
 {
-       QObject::disconnect(d.current_work_area_, SIGNAL(busy(bool)),
-               this, SLOT(setBusy(bool)));
+       if (d.current_work_area_)
+               QObject::disconnect(d.current_work_area_, SIGNAL(busy(bool)),
+                       this, SLOT(setBusy(bool)));
        disconnectBuffer();
        disconnectBufferView();
        connectBufferView(wa->bufferView());