From 1451c7cf662e4ae02bfc5f7cd1e6b0783fc5d4a7 Mon Sep 17 00:00:00 2001 From: Scott Kostyshak Date: Mon, 10 Sep 2012 23:18:22 -0400 Subject: [PATCH] Get rid of a Qt-generated stderr message 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 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index b460413612..fe69318f99 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -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()); -- 2.39.2