Skip to content

Commit b75c1b3

Browse files
author
brushtyler
committed
fix #2810
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15717 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 7ba1fbe commit b75c1b3

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

src/app/qgsrasterlayerproperties.cpp

+20-4
Original file line numberDiff line numberDiff line change
@@ -521,21 +521,37 @@ void QgsRasterLayerProperties::sync()
521521

522522
if ( mRasterLayer->dataProvider()->dataType( 1 ) == QgsRasterDataProvider::ARGBDataType )
523523
{
524-
delete tabPageSymbology;
525-
delete tabPageColormap;
524+
if ( tabPageSymbology != NULL )
525+
{
526+
delete tabPageSymbology;
527+
tabPageSymbology = NULL;
528+
}
529+
if ( tabPageColormap != NULL )
530+
{
531+
delete tabPageColormap;
532+
tabPageColormap = NULL;
533+
}
526534
gboxNoDataValue->setEnabled( false );
527535
gboxCustomTransparency->setEnabled( false );
528536
tabBar->setCurrentWidget( tabPageMetadata );
529537
}
530538

531539
if ( !( mRasterLayer->dataProvider()->capabilities() & QgsRasterDataProvider::BuildPyramids ) )
532540
{
533-
delete tabPagePyramids;
541+
if ( tabPagePyramids != NULL )
542+
{
543+
delete tabPagePyramids;
544+
tabPagePyramids = NULL;
545+
}
534546
}
535547

536548
if ( !( mRasterLayer->dataProvider()->capabilities() & QgsRasterDataProvider::Histogram ) )
537549
{
538-
delete tabPageHistogram;
550+
if ( tabPageHistogram != NULL )
551+
{
552+
delete tabPageHistogram;
553+
tabPageHistogram = NULL;
554+
}
539555
}
540556

541557
#if 0

0 commit comments

Comments
 (0)