Skip to content

Commit

Permalink
Fix Coverity null-pointer dererence warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 3, 2018
1 parent c2af8ca commit 7b0cf28
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/app/qgsoptions.cpp
Expand Up @@ -834,9 +834,10 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti

QgsColorScheme *scheme = QgsApplication::colorSchemeRegistry()->schemes().value( index );
if ( scheme )
{
mTreeCustomColors->setScheme( scheme );

updateActionsForCurrentColorScheme( scheme );
updateActionsForCurrentColorScheme( scheme );
}
} );

//
Expand Down Expand Up @@ -2336,6 +2337,9 @@ void QgsOptions::refreshSchemeComboBox()

void QgsOptions::updateActionsForCurrentColorScheme( QgsColorScheme *scheme )
{
if ( !scheme )
return;

mButtonImportColors->setEnabled( scheme->isEditable() );
mButtonPasteColors->setEnabled( scheme->isEditable() );
mButtonAddColor->setEnabled( scheme->isEditable() );
Expand Down

0 comments on commit 7b0cf28

Please sign in to comment.