diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2010-06-15 22:20:06 +0300 |
---|---|---|
committer | Ville Skyttä <ville.skytta@iki.fi> | 2010-06-15 22:20:06 +0300 |
commit | 73190a01d7fc254b7a1048914f0c05f80054dd3c (patch) | |
tree | cd464b1694485469e9dedb52818813172d0df731 | |
parent | 92711d662d7ffec560f517eb1e4878d1fa1621a9 (diff) | |
download | vdr-plugin-text2skin-73190a01d7fc254b7a1048914f0c05f80054dd3c.tar.gz vdr-plugin-text2skin-73190a01d7fc254b7a1048914f0c05f80054dd3c.tar.bz2 |
Fix crash with GraphicsMagick >= 1.3.8 and non-XPM images.
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | bitmap.c | 6 | ||||
-rw-r--r-- | bitmap.h | 1 | ||||
-rw-r--r-- | text2skin.c | 1 |
4 files changed, 9 insertions, 0 deletions
@@ -7,6 +7,7 @@ ____-__-__: Version 1.3.1 - Makefile adjustments for VDR 1.7.13. - Fixed segmentation fault with 16bit images (closes #258 - thanks to domml@vdrportal) +- Fixed crash with GraphicsMagick >= 1.3.8 and non-XPM images. 2009-10-06: Version 1.3 @@ -90,6 +90,12 @@ bool cText2SkinBitmap::Available(const std::string &Filename, int Alpha, int hei return access(Filename.c_str(), F_OK) == 0; } +void cText2SkinBitmap::Init(void) { +#ifdef HAVE_IMAGEMAGICK + InitializeMagick(NULL); +#endif +} + cText2SkinBitmap::cText2SkinBitmap(void) { mCurrent = 0; mLastGet = 0; @@ -82,6 +82,7 @@ public: int width = 0, int colors = 0); static void ResetCache(void) { mCache.Reset(); } static void FlushCache(void) { mCache.Flush(); } + static void Init(void); virtual ~cText2SkinBitmap(); diff --git a/text2skin.c b/text2skin.c index d5e3655..9435cce 100644 --- a/text2skin.c +++ b/text2skin.c @@ -51,6 +51,7 @@ cString cText2SkinPlugin::SVDRPCommand(const char *Command, const char *Option, bool cText2SkinPlugin::Start(void) { Text2SkinStatus.SetLanguage(I18nCurrentLanguage()); + cText2SkinBitmap::Init(); cText2SkinLoader::Start(); return true; } |