From a45f058a37bc1fc3890095d8e29aa83929c627a7 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 5 Feb 2024 05:34:42 +0100 Subject: [PATCH] TextEditor: Assert on nullptr bookmarks passed to gotoBookmark Task-number: QTCREATORBUG-30283 Change-Id: I1c49e57bbde098c1dda949d15d03d27349b9ce69 Reviewed-by: Eike Ziller --- src/plugins/texteditor/bookmarkmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/texteditor/bookmarkmanager.cpp b/src/plugins/texteditor/bookmarkmanager.cpp index 2e95f7213c2..62aeb2f01c8 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();