From faa8f02b08e39f03979f52b24f37cb62e158faae Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Fri, 8 Jan 2021 11:39:02 +1100 Subject: [PATCH] Bugfix for message dialog icons --- v2/internal/ffenestri/ffenestri_darwin.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/v2/internal/ffenestri/ffenestri_darwin.c b/v2/internal/ffenestri/ffenestri_darwin.c index 5a72c867d..2afb50345 100644 --- a/v2/internal/ffenestri/ffenestri_darwin.c +++ b/v2/internal/ffenestri/ffenestri_darwin.c @@ -845,7 +845,7 @@ extern void MessageDialog(struct Application *app, char *callbackID, char *type, } // Determine what dialog icon we are looking for - id dialogImage; + id dialogImage = NULL; // Look for `name-theme2x` first char *themeIcon = concat(dialogIcon, (isDarkMode(app) ? "-dark" : "-light") ); if( isRetina(app) ) { @@ -878,7 +878,9 @@ extern void MessageDialog(struct Application *app, char *callbackID, char *type, // if (dialogImage != NULL ) printf("Using %s\n", dialogIcon); } - msg(alert, s("setIcon:"), dialogImage); + if (dialogImage != NULL ) { + msg(alert, s("setIcon:"), dialogImage); + } // Run modal char *buttonPressed;