[QGIS Commit] r15109 - trunk/qgis/src/plugins/roadgraph

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Jan 31 01:48:49 EST 2011


Author: stopa85
Date: 2011-01-30 22:48:49 -0800 (Sun, 30 Jan 2011)
New Revision: 15109

Modified:
   trunk/qgis/src/plugins/roadgraph/shortestpathwidget.cpp
Log:
fix NULL pointer assigment.

Modified: trunk/qgis/src/plugins/roadgraph/shortestpathwidget.cpp
===================================================================
--- trunk/qgis/src/plugins/roadgraph/shortestpathwidget.cpp	2011-01-30 12:12:03 UTC (rev 15108)
+++ trunk/qgis/src/plugins/roadgraph/shortestpathwidget.cpp	2011-01-31 06:48:49 UTC (rev 15109)
@@ -227,6 +227,11 @@
   builder.setDestinationCrs( mPlugin->iface()->mapCanvas()->mapRenderer()->destinationSrs() );
   {
     const RgGraphDirector *director = mPlugin->director();
+    if ( director == NULL )
+    {
+      QMessageBox::critical( this, tr( "Plugin isn't configured" ), tr( "Plugin isn't configured!" ) );
+      return false;
+    }
     director->makeGraph( &builder );
 
     // not need



More information about the QGIS-commit mailing list