Skip to content

Commit

Permalink
print information on SDL_CreateSurface failing.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Apr 13, 2020
1 parent 2129be5 commit d848c04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/font/text.cpp
Expand Up @@ -725,6 +725,10 @@ void pango_text::rerender(const bool force)
surface_ = SDL_CreateRGBSurfaceFrom(
&surface_buffer_[0], width, height, 32, stride, 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000);
#endif
if(!surface_) {
ERR_GUI_L << "pango_text: SDL_CreateRGBSurfaceWithFormatFrom Failed, w="
<< width << ", h=" << height << ", reason: " << SDL_GetError() << "\n";
}
}
}

Expand Down

0 comments on commit d848c04

Please sign in to comment.