Skip to content
Permalink
Browse files
fix occassional crash when opening the attribute table
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 3a335d8033e3dc8e84c9034f38fc09d0c2145b6c
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/app/qgisapp.cpp
@@ -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

0 comments on commit 3a335d8

Please sign in to comment.