diff options
author | David Schulz <david.schulz@qt.io> | 2024-02-05 05:34:42 +0100 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2024-02-05 08:53:43 +0000 |
commit | a45f058a37bc1fc3890095d8e29aa83929c627a7 (patch) | |
tree | e4202b88859d6f63ced5dc54fa0aabe0c2f35587 | |
parent | 9296a7fb9ce0c57fe7033fb53e31da7a0e88f889 (diff) |
TextEditor: Assert on nullptr bookmarks passed to gotoBookmark
Task-number: QTCREATORBUG-30283
Change-Id: I1c49e57bbde098c1dda949d15d03d27349b9ce69
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
-rw-r--r-- | src/plugins/texteditor/bookmarkmanager.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/texteditor/bookmarkmanager.cpp b/src/plugins/texteditor/bookmarkmanager.cpp index 2e95f7213c..62aeb2f01c 100644 --- a/src/plugins/texteditor/bookmarkmanager.cpp +++ b/src/plugins/texteditor/bookmarkmanager.cpp @@ -553,6 +553,7 @@ Bookmark *BookmarkManager::bookmarkForIndex(const QModelIndex &index) const bool BookmarkManager::gotoBookmark(const Bookmark *bookmark) const { + QTC_ASSERT(bookmark, return false); if (IEditor *editor = EditorManager::openEditorAt( Utils::Link(bookmark->filePath(), bookmark->lineNumber()))) { return editor->currentLine() == bookmark->lineNumber(); |