Skip to content

Commit 96ba590

Browse files
committed
Fix potential crash in vector gradient dialog info button
Note that this doesn't seem to be actually utilised by any of the preinstalled gradients, but if users have created a gradient with info then clicking the button would have crashed QGIS. Identified by clazy. (cherry-picked from 84dade9)
1 parent 938d8ed commit 96ba590

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/gui/symbology-ng/qgsvectorgradientcolorrampv2dialog.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ void QgsVectorGradientColorRampV2Dialog::on_btnInformation_pressed()
101101
tableInfo->setRowCount( mRamp->info().count() );
102102
tableInfo->setColumnCount( 2 );
103103
int i = 0;
104-
for ( QgsStringMap::const_iterator it = mRamp->info().constBegin();
105-
it != mRamp->info().constEnd(); ++it )
104+
QgsStringMap rampInfo = mRamp->info();
105+
for ( QgsStringMap::const_iterator it = rampInfo.constBegin();
106+
it != rampInfo.constEnd(); ++it )
106107
{
107108
if ( it.key().startsWith( "cpt-city" ) )
108109
continue;

0 commit comments

Comments
 (0)