diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-27 10:03:37 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2009-03-27 10:03:37 +0100 |
commit | 9b1de6cec6725319a5ec66c1b37bf14c7833747b (patch) | |
tree | c3ad650ceeaf6ec8ccc9b9196affdda7abd87252 /src | |
parent | abba29b4f7138f91f07ef0de8e7ea7bca156a738 (diff) |
don't set initialized on error
Diffstat (limited to 'src')
-rw-r--r-- | src/OutputImage.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
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 |