Skip to content

Commit 4ffed0f

Browse files
committed
Fix crash when searching in layer properties
Fixes #21769 (cherry picked from commit 037a828)
1 parent f34802b commit 4ffed0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gui/qgsoptionsdialoghighlightwidgetsimpl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ QgsOptionsDialogHighlightTree::QgsOptionsDialogHighlightTree( QTreeView *treeVie
209209

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

0 commit comments

Comments
 (0)