Skip to content

Commit 76bf6e0

Browse files
committedJun 10, 2016
do not init dualview if no layer
fix crash of QtDesigner with custom widgets kudos to @m-kuhn
1 parent 895b955 commit 76bf6e0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed
 

‎src/gui/attributetable/qgsdualview.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ QgsDualView::QgsDualView( QWidget* parent )
6969

7070
void QgsDualView::init( QgsVectorLayer* layer, QgsMapCanvas* mapCanvas, const QgsFeatureRequest &request, const QgsAttributeEditorContext &context )
7171
{
72+
if ( !layer )
73+
return;
74+
7275
mEditorContext = context;
7376

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

0 commit comments

Comments
 (0)
Please sign in to comment.