From 1985d23391407192f8db16a56a2b574b04a78857 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Sun, 9 Apr 2023 15:59:52 +0200 Subject: [PATCH] BookmarkToolbar: Fix crash when adding a folder Signed-off-by: Juraj Oravec --- CHANGELOG | 1 + src/lib/bookmarks/bookmarkstoolbar.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 40d870988..d7aa77df6 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ Version 23.04.0 * History: Don't delete all items under dates when filtering * AdBlock: Workaround for "Blocked content" page * AddressBar: Search with default search engine by default + * Fix crash when adding new folder to the bookmark toolbar Version 22.08.2 * Fix: Typing text in the search bar sends data although suggestions are disabled (by Juraj Oravec) (BUG: 439268) diff --git a/src/lib/bookmarks/bookmarkstoolbar.cpp b/src/lib/bookmarks/bookmarkstoolbar.cpp index fab653214..517a40b63 100644 --- a/src/lib/bookmarks/bookmarkstoolbar.cpp +++ b/src/lib/bookmarks/bookmarkstoolbar.cpp @@ -187,7 +187,7 @@ void BookmarksToolbar::createNewFolder() if (!name.isEmpty()) { BookmarkItem* parent; - if (m_clickedBookmark) { + if (m_clickedBookmark && m_clickedBookmark->isFolder()) { parent = m_clickedBookmark; } else { parent = m_bookmarks->toolbarFolder();