forked from qt-creator/qt-creator
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:
@@ -553,6 +553,7 @@ Bookmark *BookmarkManager::bookmarkForIndex(const QModelIndex &index) const
|
|||||||
|
|
||||||
bool BookmarkManager::gotoBookmark(const Bookmark *bookmark) const
|
bool BookmarkManager::gotoBookmark(const Bookmark *bookmark) const
|
||||||
{
|
{
|
||||||
|
QTC_ASSERT(bookmark, return false);
|
||||||
if (IEditor *editor = EditorManager::openEditorAt(
|
if (IEditor *editor = EditorManager::openEditorAt(
|
||||||
Utils::Link(bookmark->filePath(), bookmark->lineNumber()))) {
|
Utils::Link(bookmark->filePath(), bookmark->lineNumber()))) {
|
||||||
return editor->currentLine() == bookmark->lineNumber();
|
return editor->currentLine() == bookmark->lineNumber();
|
||||||
|
Reference in New Issue
Block a user