TextEditor: Assert on nullptr bookmarks passed to gotoBookmark

Task-number: QTCREATORBUG-30283
Change-Id: I1c49e57bbde098c1dda949d15d03d27349b9ce69
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2024-02-05 05:34:42 +01:00
parent 9296a7fb9c
commit a45f058a37

View File

@@ -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();