Lagrange [work/v1.7]

Fixed crash when creating a bookmark

=> 8320401d3b32ef400072106eedb3c75367e1a12b

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)));
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.7/cdiff/8320401d3b32ef400072106eedb3c75367e1a12b
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
29.725155 milliseconds
Gemini-to-HTML Time
0.342461 milliseconds

This content has been proxied by September (ba2dc).