=> 92ee58bcb1b3eeba2527271896cae6dad66cd11d
[1mdiff --git a/res/about/version.gmi b/res/about/version.gmi[m [1mindex c7ec17a3..8e05e71f 100644[m [1m--- a/res/about/version.gmi[m [1m+++ b/res/about/version.gmi[m [36m@@ -8,6 +8,7 @@[m [m ## 1.13.8[m * Fixed issues with text selection and range visualization.[m [32m+[m[32m* macOS: Fixed crash when opening URLs via system handler when no windows open.[m [m ## 1.13.7[m * Fixed reporting of errors related to a proxy server certificate.[m [1mdiff --git a/src/app.c b/src/app.c[m [1mindex ad9eb46b..94462763 100644[m [1m--- a/src/app.c[m [1m+++ b/src/app.c[m [36m@@ -182,6 +182,8 @@[m [mstruct Impl_App {[m [m static iApp app_;[m [m [32m+[m[32mstatic iBool handleNonWindowRelatedCommand_App_(iApp *d, const char *cmd);[m [32m+[m[41m [m /*----------------------------------------------------------------------------------------------*/[m [m iDeclareType(Ticker)[m [36m@@ -1578,11 +1580,18 @@[m [mvoid processEvents_App(enum iAppEventMode eventMode) {[m d->isSuspended = iTrue;[m break;[m case SDL_APP_TERMINATING:[m [31m- setFreezeDraw_MainWindow(d->window, iTrue);[m [32m+[m[32m if (d->window) {[m [32m+[m[32m setFreezeDraw_MainWindow(d->window, iTrue);[m [32m+[m[32m }[m savePrefs_App_(d);[m saveState_App_(d);[m break;[m case SDL_DROPFILE: {[m [32m+[m[32m if (!d->window) {[m [32m+[m[32m /* Need to open an empty window now. */[m [32m+[m[32m handleNonWindowRelatedCommand_App_(d, "window.new url:");[m [32m+[m[32m iAssert(d->window);[m [32m+[m[32m }[m iBool wasUsed = processEvent_Window(as_Window(d->window), &ev);[m if (!wasUsed) {[m iBool newTab = iFalse;[m [36m@@ -2249,12 +2258,14 @@[m [msize_t windowIndex_App(const iMainWindow *win) {[m return indexOf_PtrArray(&app_.mainWindows, win); [m }[m [m [32m+[m[32m#if 0[m iMainWindow *newMainWindow_App(void) {[m iApp *d = &app_;[m iMainWindow *win = new_MainWindow(initialWindowRect_App_(d, size_PtrArray(&d->mainWindows)));[m addWindow_App(win);[m return win;[m }[m [32m+[m[32m#endif[m [m const iPtrArray *mainWindows_App(void) {[m return &app_.mainWindows;[m [36m@@ -3249,7 +3260,10 @@[m [mstatic iBool handleNonWindowRelatedCommand_App_(iApp *d, const char *cmd) {[m loadState_App_(d);[m }[m if (hasLabel_Command(cmd, "url")) {[m [31m- postCommandf_Root(newWin->base.roots[0], "~open %s", cmd + 11 /* all arguments passed on */);[m [32m+[m[32m const char *urlAndArgs = cmd + 11; /* all arguments to "window.new" passed on */[m [32m+[m[32m if (strlen(suffixPtr_Command(cmd, "url")) /* not empty URL */) {[m [32m+[m[32m postCommandf_Root(newWin->base.roots[0], "~open %s", urlAndArgs);[m [32m+[m[32m }[m }[m else {[m postCommand_Root(newWin->base.roots[0], "~navigate.home");[m [1mdiff --git a/src/app.h b/src/app.h[m [1mindex fffa304d..137f07cb 100644[m [1m--- a/src/app.h[m [1m+++ b/src/app.h[m [36m@@ -134,7 +134,7 @@[m [mvoid setActiveWindow_App (iMainWindow *win);[m void closeWindow_App (iMainWindow *win);[m size_t numWindows_App (void);[m size_t windowIndex_App (const iMainWindow *win);[m [31m-iMainWindow *newMainWindow_App (void);[m [32m+[m[32m//iMainWindow *newMainWindow_App (void);[m const iPtrArray *mainWindows_App(void);[m iMainWindow * mainWindow_App (void); /* currently active main window */[m void addPopup_App (iWindow *popup);[m
text/gemini; charset=utf-8
This content has been proxied by September (ba2dc).