Skip to content

Commit

Permalink
Fix crash when searching in layer properties
Browse files Browse the repository at this point in the history
Fixes #21769
  • Loading branch information
nyalldawson committed Apr 4, 2019
1 parent 7410fb0 commit 037a828
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/qgsoptionsdialoghighlightwidgetsimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 037a828

Please sign in to comment.