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 c256d10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
@@ -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.