Skip to content

Commit

Permalink
do not init dualview if no layer
Browse files Browse the repository at this point in the history
fix crash of QtDesigner with custom widgets
kudos to @m-kuhn
  • Loading branch information
3nids committed Jun 10, 2016
1 parent 895b955 commit 76bf6e0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/attributetable/qgsdualview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ QgsDualView::QgsDualView( QWidget* parent )

void QgsDualView::init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest &request, const QgsAttributeEditorContext &context )
{
if ( !layer )
return;

mEditorContext = context;

connect( mTableView, SIGNAL( willShowContextMenu( QMenu*, QModelIndex ) ), this, SLOT( viewWillShowContextMenu( QMenu*, QModelIndex ) ) );
Expand Down

0 comments on commit 76bf6e0

Please sign in to comment.