Skip to content
Permalink
Browse files

Fix crash when opening layer propertie on a bad raster layer

unreported

... and hit apply after changing the renderer or the
transparency.
  • Loading branch information
elpaso authored and nyalldawson committed Mar 19, 2019
1 parent 6c85769 commit 5bbe0280b754739e2f7b477c5fdd46c7265806c0
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 5bbe028

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