From 9b1de6cec6725319a5ec66c1b37bf14c7833747b Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 27 Mar 2009 10:03:37 +0100 Subject: don't set initialized on error --- src/OutputImage.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/OutputImage.cxx b/src/OutputImage.cxx index dd14fc6..c5848b4 100644 --- a/src/OutputImage.cxx +++ b/src/OutputImage.cxx @@ -17,12 +17,18 @@ OutputImage::OutputImage() { int OutputImage::init(int w1, int h1) { + int ret; + W = w1; H = h1; line = 0; - initialized = 1; - return init_internal(); + ret = init_internal(); + + if (ret == 0) + initialized = 1; + + return ret; } int -- cgit v1.2.3