Skip to content

Commit

Permalink
fix occassional crash when opening the attribute table
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12241 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Nov 24, 2009
1 parent 0dd2615 commit 3a335d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app/qgisapp.cpp
Expand Up @@ -4091,7 +4091,12 @@ void QgisApp::attributeTable()
return;
}

QgsVectorLayer * myLayer = qobject_cast<QgsVectorLayer *>( mMapLegend->currentLayer() );
QgsVectorLayer *myLayer = qobject_cast<QgsVectorLayer *>( mMapLegend->currentLayer() );
if ( !myLayer )
{
return;
}

QgsAttributeTableDialog *mDialog = new QgsAttributeTableDialog( myLayer );
mDialog->show();
// the dialog will be deleted by itself on close
Expand Down

0 comments on commit 3a335d8

Please sign in to comment.