Skip to content
Permalink
Browse files
Fix Coverity null pointer derefence issues
  • Loading branch information
nyalldawson committed Mar 21, 2017
1 parent ce6783a commit f6699332a339e62828a0d0d3206c9c9a0c3d1009
@@ -87,7 +87,7 @@ void QgsComposerPolygonWidget::updateStyleFromWidget()
{
if ( QgsSymbolSelectorWidget *w = qobject_cast<QgsSymbolSelectorWidget *>( sender() ) )
{
mComposerPolygon->setPolygonStyleSymbol( dynamic_cast< QgsFillSymbol * >( w->symbol() ) );
mComposerPolygon->setPolygonStyleSymbol( static_cast< QgsFillSymbol * >( w->symbol() ) );
mComposerPolygon->update();
}
}
@@ -80,7 +80,7 @@ void QgsComposerPolylineWidget::updateStyleFromWidget()
{
if ( QgsSymbolSelectorWidget *w = qobject_cast<QgsSymbolSelectorWidget *>( sender() ) )
{
mComposerPolyline->setPolylineStyleSymbol( dynamic_cast< QgsLineSymbol * >( w->symbol() ) );
mComposerPolyline->setPolylineStyleSymbol( static_cast< QgsLineSymbol * >( w->symbol() ) );
mComposerPolyline->update();
}
}
@@ -183,7 +183,7 @@ void QgsComposerShapeWidget::toggleRadiusSpin( const QString &shapeText )
void QgsComposerShapeWidget::updateSymbolFromWidget()
{
if ( QgsSymbolSelectorWidget *w = qobject_cast<QgsSymbolSelectorWidget *>( sender() ) )
mComposerShape->setShapeStyleSymbol( dynamic_cast< QgsFillSymbol * >( w->symbol() ) );
mComposerShape->setShapeStyleSymbol( static_cast< QgsFillSymbol * >( w->symbol() ) );
}

void QgsComposerShapeWidget::cleanUpSymbolSelector( QgsPanelWidget *container )
@@ -201,7 +201,7 @@ void QgsCompositionWidget::updateStyleFromWidget()
{
if ( QgsSymbolSelectorWidget *w = qobject_cast<QgsSymbolSelectorWidget *>( sender() ) )
{
mComposition->setPageStyleSymbol( dynamic_cast< QgsFillSymbol * >( w->symbol() ) );
mComposition->setPageStyleSymbol( static_cast< QgsFillSymbol * >( w->symbol() ) );
mComposition->update();
}
}

0 comments on commit f669933

Please sign in to comment.