diff --git a/src/fe-common/core/formats.h b/src/fe-common/core/formats.h index 27e87715..4af7ed27 100644 --- a/src/fe-common/core/formats.h +++ b/src/fe-common/core/formats.h @@ -54,7 +54,8 @@ typedef struct { } TEXT_DEST_REC; #define window_get_theme(window) \ - ((window)->theme != NULL ? (window)->theme : current_theme) + (window != NULL && (window)->theme != NULL ? \ + (window)->theme : current_theme) int format_find_tag(const char *module, const char *tag);