Skip to content
Permalink
Browse files

Fix crash when searching in layer properties

Fixes #21769
  • Loading branch information
nyalldawson committed Apr 4, 2019
1 parent 7410fb0 commit 037a8283fa4b88fc2559ce1b54782bc52ad7abfc
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/gui/qgsoptionsdialoghighlightwidgetsimpl.cpp
@@ -209,7 +209,7 @@ QgsOptionsDialogHighlightTree::QgsOptionsDialogHighlightTree( QTreeView *treeVie

bool QgsOptionsDialogHighlightTree::searchText( const QString &text )
{
if ( !mTreeView )
if ( !mTreeView || !mTreeView->model() )
return false;
QModelIndexList hits = mTreeView->model()->match( mTreeView->model()->index( 0, 0 ), Qt::DisplayRole, text, 1, Qt::MatchContains | Qt::MatchRecursive );
return !hits.isEmpty();

0 comments on commit 037a828

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