--- a/application/davcontroller.c Wed Feb 07 17:10:01 2024 +0100 +++ b/application/davcontroller.c Thu Feb 08 10:22:58 2024 +0100 @@ -524,6 +524,9 @@ update_upload_labels(upload); } +static void upload_window_closed(UiEvent *event, void *data) { + // noop, prevents context destruction +} void davbrowser_upload_files(UiObject *ui, DavBrowser *browser, UiFileList files) { if (!browser->sn) { @@ -550,6 +553,7 @@ // create upload progress window cxmutstr wtitle = cx_asprintf("Upload to: %s", ui_get(browser->path)); UiObject *dialog = ui_simple_window(wtitle.ptr, upload); + ui_context_closefunc(dialog->ctx, upload_window_closed, NULL); free(wtitle.ptr); upload->dialog = dialog; ui_window_size(dialog, 550, 120);