<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39657 >

 $subject


 - ML

diff -Nurd -X.diff_ignore freeciv/client/gui-sdl/gui_string.c freeciv/client/gui-sdl/gui_string.c
--- freeciv/client/gui-sdl/gui_string.c	2007-08-20 01:35:26.000000000 +0300
+++ freeciv/client/gui-sdl/gui_string.c	2007-09-02 14:06:59.000000000 +0300
@@ -280,12 +280,15 @@
     break;
   }
 
-  freelog(LOG_DEBUG,
-	  _("SDL_create_str16_surf: Font is generally %d big, and "
-	    "string is %hd big"), TTF_FontHeight(pString->font), pText->h);
-  freelog(LOG_DEBUG, _("SDL_create_str16_surf: String is %d lenght"),
-	  pText->w);
-
+  if (pText != NULL) {
+    freelog(LOG_DEBUG,
+            _("SDL_create_str16_surf: Font is generally %d big, and "
+              "string is %hd big"), TTF_FontHeight(pString->font), pText->h);
+    freelog(LOG_DEBUG, _("SDL_create_str16_surf: String is %d lenght"),
+            pText->w);
+  } else {
+    freelog(LOG_DEBUG, "SDL_create_str16_surf: pText NULL");
+  }
 
   if (!((pString->style & 0x0F) & TTF_STYLE_NORMAL)) {
     TTF_SetFontStyle(pString->font, TTF_STYLE_NORMAL);
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to