FreeTypeFont not freeing d_fontData correctly

Create issue
Issue #60 resolved
Former user created an issue

Automatic migration. Original reporter: "nightwolf"

In file CEGUIFreeTypeFont.cpp, line 375, the class member d_fontData is freed by calling the Release() method, which is not correct and produces errors when using a custom memory manager.

Please free the d_fontData member using unloadRawDataContainer() from the current resource provider, allowing custom resource providers to free the container themselves.

If the custom memory manager pads the memory buffers, thus returning slightly different pointers from the ones returned by the CRT, this bug causes an exception to be raised in debug mode by the runtime library itself.

Reproducibility: always

OS: Windows, OS build: XP, Platform: PC

Comments (3)

  1. Former user Account Deleted

    Original reporter: zap

    Here is a patch file that fixes two things:

    • Calls unloadRawDataContainer() as suggested above
    • Fixes for infinite looping in some special cases in FreeTypeFont.cpp
  2. Log in to comment