Skip to content
Permalink
Browse files
Fix some possible null pointer dereferences
  • Loading branch information
nyalldawson committed May 30, 2015
1 parent e5fb5a6 commit cf7303fcf161f1d949d2a32fb0481d5d2c99af5d
Showing with 6 additions and 3 deletions.
  1. +6 −3 src/gui/symbology-ng/qgsrendererv2widget.cpp
@@ -137,7 +137,8 @@ void QgsRendererV2Widget::changeSymbolWidth()
QList<QgsSymbolV2*>::iterator symbolIt = symbolList.begin();
for ( ; symbolIt != symbolList.end(); ++symbolIt )
{
dynamic_cast<QgsLineSymbolV2*>( *symbolIt )->setWidth( dlg.mSpinBox->value() );
if (( *symbolIt )->type() == QgsSymbolV2::Line )
static_cast<QgsLineSymbolV2*>( *symbolIt )->setWidth( dlg.mSpinBox->value() );
}
}
refreshSymbolView();
@@ -161,7 +162,8 @@ void QgsRendererV2Widget::changeSymbolSize()
QList<QgsSymbolV2*>::iterator symbolIt = symbolList.begin();
for ( ; symbolIt != symbolList.end(); ++symbolIt )
{
dynamic_cast<QgsMarkerSymbolV2*>( *symbolIt )->setSize( dlg.mSpinBox->value() );
if (( *symbolIt )->type() == QgsSymbolV2::Marker )
static_cast<QgsMarkerSymbolV2*>( *symbolIt )->setSize( dlg.mSpinBox->value() );
}
}
refreshSymbolView();
@@ -185,7 +187,8 @@ void QgsRendererV2Widget::changeSymbolAngle()
QList<QgsSymbolV2*>::iterator symbolIt = symbolList.begin();
for ( ; symbolIt != symbolList.end(); ++symbolIt )
{
dynamic_cast<QgsMarkerSymbolV2*>( *symbolIt )->setAngle( dlg.mSpinBox->value() );
if (( *symbolIt )->type() == QgsSymbolV2::Marker )
static_cast<QgsMarkerSymbolV2*>( *symbolIt )->setAngle( dlg.mSpinBox->value() );
}
}
refreshSymbolView();

0 comments on commit cf7303f

Please sign in to comment.