From 8320401d3b32ef400072106eedb3c75367e1a12b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jaakko=20Kera=CC=88nen?= jaakko.keranen@iki.fi
Date: Mon, 29 Nov 2021 18:24:25 +0200
Subject: [PATCH 1/1] Fixed crash when creating a bookmark
The parent folder pointer was possibly uninitialized.
src/ui/sidebarwidget.c | 1 +
src/ui/util.c | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 550fccde..844f6d7c 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -927,6 +927,7 @@ static void itemClicked_SidebarWidget_(iSidebarWidget *d, iSidebarItem *item, si
}
else {
insert_IntSet(d->closedFolders, item->id);
setRecentFolder_Bookmarks(bookmarks_App(), 0);
}
updateItems_SidebarWidget_(d);
break;
diff --git a/src/ui/util.c b/src/ui/util.c
index baa05082..84de4b74 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -2862,8 +2862,10 @@ iWidget *makeBookmarkEditor_Widget(void) {
constData_Array(folderItems),
size_Array(folderItems))), alignLeft_WidgetFlag),
"bmed.folder");
const uint32_t recentFolderId = recentFolder_Bookmarks(bookmarks_App());
updateDropdownSelection_LabelWidget(
folderButton, format_CStr(" arg:%u", recentFolder_Bookmarks(bookmarks_App())));
folderButton, format_CStr(" arg:%u", recentFolderId));
setUserData_Object(folderButton, get_Bookmarks(bookmarks_App(), recentFolderId));
}
addDialogInputWithHeading_(headings, values, "${dlg.bookmark.tags}", "bmed.tags", iClob(inputs[2] = new_InputWidget(0)));
addDialogInputWithHeading_(headings, values, "${dlg.bookmark.icon}", "bmed.icon", iClob(inputs[3] = new_InputWidget(1)));
--
2.25.1
text/plain
This content has been proxied by September (ba2dc).