summaryrefslogtreecommitdiffstats
path: root/academic/drawtiming/InitializeMagick.diff
diff options
context:
space:
mode:
Diffstat (limited to 'academic/drawtiming/InitializeMagick.diff')
-rw-r--r--academic/drawtiming/InitializeMagick.diff30
1 files changed, 30 insertions, 0 deletions
diff --git a/academic/drawtiming/InitializeMagick.diff b/academic/drawtiming/InitializeMagick.diff
new file mode 100644
index 0000000000..d610544a76
--- /dev/null
+++ b/academic/drawtiming/InitializeMagick.diff
@@ -0,0 +1,30 @@
+Description: Properly initialize GraphicsMagick
+ Quoting from GraphicsMagick's NEWS file "
+ 1.3.8 (January 21, 2010)
+ ========================
+ [...]
+ Behavior Changes:
+ InitializeMagick() MUST be invoked prior to using any Magick API function.
+ Failure to do so will likely lead to an immediate application crash. This is
+ due to initialization and runtime changes intended to improve thread safety
+ and efficiency. Previously it was only strongly recommended to invoke
+ InitializeMagick().
+ "
+Author: Galland (https://launchpad.net/~victor-lopez)
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/636021
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=599915
+Bug: http://sourceforge.net/tracker/index.php?func=detail&aid=3136111&group_id=118983&atid=682742
+Forwarded: yes
+
+--- a/src/main.cc
++++ b/src/main.cc
+@@ -97,6 +97,9 @@
+ double scale = 1;
+ int flags = 0;
+
++#ifndef LITE
++ InitializeMagick(NULL);
++#endif /* ! LITE */
+ int k, c;
+ while ((c = getopt_long (argc, argv, "ac:f:hl:o:p:vVw:x:", opts, &k)) != -1)
+ switch (c) {