Skip to content

Commit d208b29

Browse files
committed
message log: fix crash on exit
1 parent b8bf86b commit d208b29

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/gui/qgsmessagelogviewer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ QgsMessageLogViewer::QgsMessageLogViewer( QStatusBar *statusBar, QWidget *parent
6060
mButton->setCheckable( true );
6161
mButton->hide();
6262
connect( mButton, SIGNAL( toggled( bool ) ), this, SLOT( buttonToggled( bool ) ) );
63+
connect( mButton, SIGNAL( destroyed() ), this, SLOT( buttonDestroyed() ) );
6364
statusBar->addPermanentWidget( mButton, 0 );
6465
}
6566

@@ -100,6 +101,11 @@ void QgsMessageLogViewer::buttonToggled( bool checked )
100101
w->hide();
101102
}
102103

104+
void QgsMessageLogViewer::buttonDestroyed()
105+
{
106+
mButton = 0;
107+
}
108+
103109
void QgsMessageLogViewer::logMessage( QString message, QString tag, int level )
104110
{
105111
mButton->setToolTip( tr( "%1 message(s) logged." ).arg( mCount++ ) );

src/gui/qgsmessagelogviewer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class GUI_EXPORT QgsMessageLogViewer: public QDialog, private Ui::QgsMessageLogV
5252
private slots:
5353
void closeTab( int index );
5454
void buttonToggled( bool checked );
55+
void buttonDestroyed();
5556
};
5657

5758
#endif

0 commit comments

Comments
 (0)