made _save function discard the underlying object
authorkramm <kramm>
Fri, 4 May 2007 13:20:45 +0000 (13:20 +0000)
committerkramm <kramm>
Fri, 4 May 2007 13:20:45 +0000 (13:20 +0000)
lib/python/gfx.c

index 336d162..016d1ce 100644 (file)
@@ -89,6 +89,7 @@ static PyObject* output_save(PyObject* _self, PyObject* args, PyObject* kwargs)
        return NULL;
 
     gfxresult_t*result = self->output_device->finish(self->output_device);
+    self->output_device = 0;
     if(result->save(result, filename) < 0) {
        return PY_ERROR("Couldn't write to %s", filename);
     }