Skip to content
Permalink
Browse files

Merge pull request #9563 from elpaso/bugfix-unreported-raster-crash-o…

…n-bad-layers

Fix crash when opening layer properties on a bad raster layer
  • Loading branch information
elpaso committed Mar 20, 2019
2 parents ba416d2 + aeba867 commit 567da1bd794f3dd1342a24c79f05b4d0b41ded9a
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/app/qgsrasterlayerproperties.cpp
@@ -833,6 +833,11 @@ void QgsRasterLayerProperties::sync()
*/
void QgsRasterLayerProperties::apply()
{

// Do nothing on "bad" layers
if ( !mRasterLayer->isValid() )
return;

/*
* Legend Tab
*/
@@ -1193,7 +1198,7 @@ void QgsRasterLayerProperties::urlClicked( const QUrl &url )

void QgsRasterLayerProperties::mRenderTypeComboBox_currentIndexChanged( int index )
{
if ( index < 0 || mDisableRenderTypeComboBoxCurrentIndexChanged )
if ( index < 0 || mDisableRenderTypeComboBoxCurrentIndexChanged || ! mRasterLayer->renderer() )
{
return;
}

0 comments on commit 567da1b

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