Loading

Paste #pwt8ay35p

  1. diff --git a/CorsixTH/Src/th_gfx_font.cpp b/CorsixTH/Src/th_gfx_font.cpp
  2. index b3cdcd0..09a62d2 100644
  3. --- a/CorsixTH/Src/th_gfx_font.cpp
  4. +++ b/CorsixTH/Src/th_gfx_font.cpp
  5. @@ -731,8 +731,11 @@ int THFreeTypeFont::drawTextWrapped(THRenderTarget* pCanvas, const char* sMessag
  6.          }
  7.  
  8.          // Convert the canvas to a texture
  9. -        _makeTexture(pCanvas, pEntry);
  10. -        pEntry->bIsValid = true;
  11. +        if (pCanvas != NULL)
  12. +        {
  13. +            _makeTexture(pCanvas, pEntry);
  14. +            pEntry->bIsValid = true;
  15. +        }
  16.      }
  17.  
  18.      if(pCanvas != NULL)

Comments