From 09b5baa3d9544c58ee47f1254278da5063075e81 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sun, 25 Nov 2001 16:31:24 +0000 Subject: [PATCH] window_get_theme() now checks that window isn't NULL, so we don't crash if something tries to print to screen when there's no windows yet. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2146 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-common/core/formats.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);