diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-25 16:31:24 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-25 16:31:24 +0000 |
commit | 09b5baa3d9544c58ee47f1254278da5063075e81 (patch) | |
tree | ff079697363ea4d7955297f90ee03796f8707793 /src/fe-common | |
parent | ba445fe37eba5fe0138904b41987d45ab0ae41a2 (diff) | |
download | irssi-09b5baa3d9544c58ee47f1254278da5063075e81.zip |
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
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/core/formats.h | 3 |
1 files changed, 2 insertions, 1 deletions
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); |