Skip to content

Commit

Permalink
Fixed crash in browser startup on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Dec 1, 2014
1 parent 48edab4 commit 4fde34a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgsbrowserdockwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,9 @@ void QgsBrowserDockWidget::showEvent( QShowEvent * e )
void QgsBrowserDockWidget::hideEvent( QHideEvent * e )
{
QgsDebugMsg( "Entered" );
saveState();
// hideEvent() may be called (Mac) before showEvent
if ( mModel )
saveState();
QDockWidget::hideEvent( e );
}

Expand Down Expand Up @@ -811,6 +813,9 @@ QStringList QgsBrowserDockWidget::expandedPathsList( const QModelIndex & proxyIn
{
QStringList paths;

if ( !mModel || !mProxyModel || !mBrowserView )
return paths;

for ( int i = 0; i < mProxyModel->rowCount( proxyIndex ); i++ )
{
QModelIndex childProxyIndex = mProxyModel->index( i, 0, proxyIndex );
Expand Down

0 comments on commit 4fde34a

Please sign in to comment.