mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-10 00:13:55 -04:00
Merge pull request #9563 from elpaso/bugfix-unreported-raster-crash-on-bad-layers
Fix crash when opening layer properties on a bad raster layer
This commit is contained in:
commit
567da1bd79
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user