From e1202f2dfe868253ed0b42ad0742272c25161f12 Mon Sep 17 00:00:00 2001 From: unK Date: Sun, 26 Oct 2008 00:44:42 +0200 Subject: [PATCH] check if wHeader is NULL or not (thx to Thomas Adam) --- src/ncmpcpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ncmpcpp.cpp b/src/ncmpcpp.cpp index 5df3b3c9..e361cbf4 100644 --- a/src/ncmpcpp.cpp +++ b/src/ncmpcpp.cpp @@ -354,7 +354,7 @@ int main(int argc, char *argv[]) messages_allowed = 1; // header stuff - const int max_allowed_title_length = wHeader->GetWidth()-volume_state.length(); + const int max_allowed_title_length = wHeader ? wHeader->GetWidth()-volume_state.length() : 0; if (current_screen == csBrowser && input == ERR && browsed_dir.length() > max_allowed_title_length) redraw_header = 1; if (Config.header_visibility && redraw_header)