Skip to content
Permalink
Browse files

Added 0 pointer checks to saveAs

git-svn-id: http://svn.osgeo.org/qgis/trunk@13281 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent
mhugent committed Apr 8, 2010
1 parent 7d888d4 commit 81cd2a5043958b4888bea2d494dbd236b25aeb06
Showing with 18 additions and 4 deletions.
  1. +18 −4 src/app/qgisapp.cpp
@@ -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
{
@@ -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()
@@ -6720,7 +6734,7 @@ void QgisApp::namUpdate()
}

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

0 comments on commit 81cd2a5

Please sign in to comment.
You can’t perform that action at this time.