[QGIS Commit] r12241 - trunk/qgis/src/app
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Nov 24 14:59:11 EST 2009
Author: jef
Date: 2009-11-24 14:59:09 -0500 (Tue, 24 Nov 2009)
New Revision: 12241
Modified:
trunk/qgis/src/app/qgisapp.cpp
Log:
fix occassional crash when opening the attribute table
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2009-11-24 17:43:00 UTC (rev 12240)
+++ trunk/qgis/src/app/qgisapp.cpp 2009-11-24 19:59:09 UTC (rev 12241)
@@ -4091,7 +4091,12 @@
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
More information about the QGIS-commit
mailing list