diff options
-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 |