diff --git a/CorsixTH/Src/th_gfx_font.cpp b/CorsixTH/Src/th_gfx_font.cpp index b3cdcd0..09a62d2 100644 --- a/CorsixTH/Src/th_gfx_font.cpp +++ b/CorsixTH/Src/th_gfx_font.cpp @@ -731,8 +731,11 @@ int THFreeTypeFont::drawTextWrapped(THRenderTarget* pCanvas, const char* sMessag } // Convert the canvas to a texture - _makeTexture(pCanvas, pEntry); - pEntry->bIsValid = true; + if (pCanvas != NULL) + { + _makeTexture(pCanvas, pEntry); + pEntry->bIsValid = true; + } } if(pCanvas != NULL)