Skip to content

Commit 92dddb7

Browse files
author
jef
committed
fix occassional crash when opening the attribute table
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12241 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent cfb6d6b commit 92dddb7

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/app/qgisapp.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -4091,7 +4091,12 @@ void QgisApp::attributeTable()
40914091
return;
40924092
}
40934093

4094-
QgsVectorLayer * myLayer = qobject_cast<QgsVectorLayer *>( mMapLegend->currentLayer() );
4094+
QgsVectorLayer *myLayer = qobject_cast<QgsVectorLayer *>( mMapLegend->currentLayer() );
4095+
if ( !myLayer )
4096+
{
4097+
return;
4098+
}
4099+
40954100
QgsAttributeTableDialog *mDialog = new QgsAttributeTableDialog( myLayer );
40964101
mDialog->show();
40974102
// the dialog will be deleted by itself on close

0 commit comments

Comments
 (0)