Skip to content
Permalink
Browse files

Fix some Coverity dereference null pointer warnings

  • Loading branch information
nyalldawson committed May 1, 2016
1 parent 1f032aa commit c256d10faa23ae570bc55b0cce85225cc47b5561
Showing with 4 additions and 3 deletions.
  1. +1 −1 src/core/symbology-ng/qgsfillsymbollayerv2.cpp
  2. +3 −2 src/gui/qgsattributeformeditorwidget.cpp
@@ -3455,7 +3455,7 @@ void QgsCentroidFillSymbolLayerV2::renderPolygon( const QPolygonF& points, QList
if ( context.geometryPartCount() > 1 )
{
const QgsGeometry *geom = feature->constGeometry();
const QgsGeometryCollectionV2* geomCollection = dynamic_cast<const QgsGeometryCollectionV2*>( geom->geometry() );
const QgsGeometryCollectionV2* geomCollection = static_cast<const QgsGeometryCollectionV2*>( geom->geometry() );

double area = 0;
double areaBiggest = 0;
@@ -66,7 +66,7 @@ void QgsAttributeFormEditorWidget::setMode( QgsAttributeFormEditorWidget::Mode m

void QgsAttributeFormEditorWidget::setIsMixed( bool mixed )
{
if ( mixed )
if ( mWidget && mixed )
mWidget->showIndeterminateState( );
mMultiEditButton->setIsMixed( mixed );
mIsMixed = mixed;
@@ -123,7 +123,8 @@ void QgsAttributeFormEditorWidget::resetValue()
{
mIsChanged = false;
mBlockValueUpdate = true;
mWidget->setValue( mPreviousValue );
if ( mWidget )
mWidget->setValue( mPreviousValue );
mBlockValueUpdate = false;

switch ( mMode )

0 comments on commit c256d10

Please sign in to comment.
You can’t perform that action at this time.