Added 0 pointer checks to saveAs

git-svn-id: http://svn.osgeo.org/qgis/trunk@13281 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
mhugent 2010-04-08 09:43:46 +00:00
parent 7d888d4a94
commit 81cd2a5043

View File

@ -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 );