added checking for NULL pointer for drawing wrapped info text
authorHolger Schemel <holger.schemel@virtion.de>
Fri, 6 Dec 2024 17:01:55 +0000 (18:01 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Fri, 6 Dec 2024 12:05:06 +0000 (13:05 +0100)
src/screens.c

index 651b6830113ae4047c6668dd1ebc52ab4691777e..478d57387a5bbaf421fb699fe592caee28137648 100644 (file)
@@ -4440,7 +4440,7 @@ static void DrawInfoScreen_GenericScreen(int screen_nr, int num_screens, int use
 
   SetWrappedText_GenericScreen(tmi, screen_nr, use_global_screens);
 
-  if (wrapped_text->total_height > wrapped_text->max_height)
+  if (wrapped_text != NULL && wrapped_text->total_height > wrapped_text->max_height)
   {
     // re-wrap text with text width reduced by scroll bar width
     tmi->width -= SC_SCROLL_VERTICAL_XSIZE;