Author: Martin Michlmayr <tbm@cyrius.com>
Description: Check if template style exists before processing images
Bug-Debian: http://bugs.debian.org/308114

--- bins-1.1.29.orig/bins
+++ bins-1.1.29/bins
@@ -1092,6 +1092,11 @@
         exit 1;
     }
 
+    if (! scalar templateDirs($configHash)) {
+        print "Cannot find template style '", $configHash->{templateStyle}, "'\n";
+        exit 1;
+    }
+
     $picdir = $ARGV[0];
     $albumdir = $ARGV[1];
 
