Skip to content

Commit

Permalink
QgsAttributeTableView::setModel(): fix crash when called with nullptr…
Browse files Browse the repository at this point in the history
…, such as QgsBrowser::setLayer() does (#15006)
  • Loading branch information
rouault committed Jun 12, 2016
1 parent ffaf493 commit 6b80170
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/gui/attributetable/qgsattributetableview.cpp
Expand Up @@ -142,11 +142,12 @@ void QgsAttributeTableView::setModel( QgsAttributeTableFilterModel* filterModel
mTableDelegate->setFeatureSelectionModel( mFeatureSelectionModel );
connect( mFeatureSelectionModel, SIGNAL( requestRepaint( QModelIndexList ) ), this, SLOT( repaintRequested( QModelIndexList ) ) );
connect( mFeatureSelectionModel, SIGNAL( requestRepaint() ), this, SLOT( repaintRequested() ) );
}

mActionWidget = createActionWidget( 0 );
mActionWidget->setVisible( false );
updateActionImage( mActionWidget );
delete mActionWidget;
mActionWidget = createActionWidget( 0 );
mActionWidget->setVisible( false );
updateActionImage( mActionWidget );
}
}

void QgsAttributeTableView::setFeatureSelectionManager( QgsIFeatureSelectionManager* featureSelectionManager )
Expand Down

0 comments on commit 6b80170

Please sign in to comment.