Skip to content
Permalink
Browse files

Fix crash when searching in layer properties

Fixes #21769

(cherry picked from commit 037a828)
  • Loading branch information
nyalldawson committed Apr 4, 2019
1 parent b7ee7b5 commit eb88cc4b4ff9f9a7f9ca3a030928b5ddd84a1c79
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 eb88cc4

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