Lagrange [work/v1.10]

Fixed crash when editing a bookmark folder

=> b11a9a81c0047b3371af399933089041b4a044ea

diff --git a/src/ui/util.c b/src/ui/util.c
index a2c41fbc..02935469 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -3348,6 +3348,9 @@ static const iArray *makeBookmarkFolderItems_(iBool withNullTerminator) {
 }
 
 iWidget *makeBookmarkEditor_Widget(iBool isFolder, iBool withDup) {
+    if (isFolder) {
+        withDup = iFalse;
+    }
     const iMenuItem dupActions[] = {
         { "${menu.dup}", 0, 0, "bmed.dup" },
         { "---" },
@@ -3454,7 +3457,10 @@ iWidget *makeBookmarkEditor_Widget(iBool isFolder, iBool withDup) {
                 as_Widget(inputs[i])->rect.size.x = inputWidth;
             }
         }
-        ((iWidget *) findChild_Widget(dlg, "bmed.setident"))->rect.size.x = inputWidth;
+        iWidget *setIdent = findChild_Widget(dlg, "bmed.setident");
+        if (setIdent) {
+            setIdent->rect.size.x = inputWidth;
+        }
         addChild_Widget(dlg, iClob(makePadding_Widget(gap_UI)));
         addChild_Widget(dlg,
                         iClob(makeDialogButtons_Widget(withDup ? dupActions : actions,
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.10/cdiff/b11a9a81c0047b3371af399933089041b4a044ea
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
232.798113 milliseconds
Gemini-to-HTML Time
0.385265 milliseconds

This content has been proxied by September (ba2dc).