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.
This commit is contained in:
Scott Kostyshak 2012-09-10 23:18:22 -04:00
parent 9d05ac5c91
commit 1451c7cf66

View 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());