summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-09-05 16:59:16 +0200
committerkamel5 <vdr.kamel5 (at) gmx (dot) net>2019-09-05 17:08:12 +0200
commitf4369c077258f4d64d9ff66b854fd8e7aee4548c (patch)
tree51bfb4fc2bf9c20ca8bfbc534fda60d756ee389b
parent0203cb3f01f2e5122ba8e264166afa3438a619a1 (diff)
downloadvdr-plugin-tvguide-f4369c077258f4d64d9ff66b854fd8e7aee4548c.tar.gz
vdr-plugin-tvguide-f4369c077258f4d64d9ff66b854fd8e7aee4548c.tar.bz2
Fix a segfault with graphicsmagick > 1.3.31
-rw-r--r--imageloader.c1
-rw-r--r--imagemagickwrapper.c1
-rw-r--r--tvguide.c5
3 files changed, 5 insertions, 2 deletions
diff --git a/imageloader.c b/imageloader.c
index 9707dea..0ae45d2 100644
--- a/imageloader.c
+++ b/imageloader.c
@@ -11,7 +11,6 @@
using namespace Magick;
cImageLoader::cImageLoader() {
- InitializeMagick(NULL);
}
cImageLoader::~cImageLoader() {
diff --git a/imagemagickwrapper.c b/imagemagickwrapper.c
index cbaf623..8fef14f 100644
--- a/imagemagickwrapper.c
+++ b/imagemagickwrapper.c
@@ -5,7 +5,6 @@
#include "imagescaler.h"
cImageMagickWrapper::cImageMagickWrapper() {
- InitializeMagick(NULL);
}
cImageMagickWrapper::~cImageMagickWrapper() {
diff --git a/tvguide.c b/tvguide.c
index 8b541fb..073e3ef 100644
--- a/tvguide.c
+++ b/tvguide.c
@@ -12,6 +12,7 @@
#include <vdr/plugin.h>
#include <vdr/device.h>
#include <vdr/menu.h>
+#include <Magick++.h>
#define DEFINE_CONFIG 1
#include "geometrymanager.h"
@@ -93,6 +94,10 @@ bool cPluginTvguide::ProcessArgs(int argc, char *argv[]) {
return true;
}
+__attribute__((constructor)) static void init(void) {
+ Magick::InitializeMagick(NULL);
+}
+
bool cPluginTvguide::Initialize(void) {
config.SetDefaultPathes();
config.LoadTheme();