Code review comment for lp:~widelands-dev/widelands/graphic_resetting

Revision history for this message
cghislai (charlyghislain) wrote :

I get an invalid pointer when trying to free colormap (Colormap::~Colormap at line 66)
This happens when i change to opengl rendering after having played with non-opengl graphics

Additionally, i get a crash at GLSurfaceTexture::setup_gl(), line 280. This happens when using opengl and buildings statistics. The cause seems to be the attempt to render an empty text. At SubTagRenderNode::render(SurfaceCache* surface_cache), the following code throws the exception in place of the crash:

virtual Surface* render(SurfaceCache* surface_cache) {
  if (width() == 0 && height() == 0)
   throw RT::Exception("RT render: Tried to render empty surface");

Handling special cases to prevent blitting to happen for empty text (but with rich text tags), this latter crash can be avoided.

Using trunk, i get the crash at fonthandler_1.cc:99 described in the bug report when trying to render the loading screen tip using opengl.

« Back to merge proposal