Navigation Menu

Skip to content

Commit

Permalink
Added 0 pointer checks to saveAs
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13281 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Apr 8, 2010
1 parent 02f8cf5 commit a6af7bb
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/app/qgisapp.cpp
Expand Up @@ -3134,7 +3134,7 @@ void QgisApp::newSpatialiteLayer()
QString baseSQL;
if ( spatialiteDialog.includePrimaryKey() )
{
baseSQL = "create table %1(pkuid integer primary key autoincrement, ";
baseSQL = "create table %1(pkuid integer primary key autoincrement, ";
}
else
{
Expand Down Expand Up @@ -3911,12 +3911,26 @@ void QgisApp::attributeTable()

void QgisApp::saveAsVectorFile()
{
mMapLegend->currentLegendLayer()->saveAsVectorFile();
if ( mMapLegend )
{
QgsLegendLayer* currentLegendLayer = mMapLegend->currentLegendLayer();
if ( currentLegendLayer )
{
currentLegendLayer->saveAsVectorFile();
}
}
}

void QgisApp::saveSelectionAsVectorFile()
{
mMapLegend->currentLegendLayer()->saveSelectionAsVectorFile();
if ( mMapLegend )
{
QgsLegendLayer* currentLegendLayer = mMapLegend->currentLegendLayer();
if ( currentLegendLayer )
{
currentLegendLayer->saveSelectionAsVectorFile();
}
}
}

void QgisApp::layerProperties()
Expand Down Expand Up @@ -6720,7 +6734,7 @@ void QgisApp::namUpdate()
}

#if QT_VERSION >= 0x40500
if( !mProxyFactory )
if ( !mProxyFactory )
{
mProxyFactory = new QgsNetworkProxyFactory();
mNAM->setProxyFactory( mProxyFactory );
Expand Down

0 comments on commit a6af7bb

Please sign in to comment.