diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2014-03-09 20:30:00 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2014-03-09 20:30:00 +0100 |
commit | 57ea9ae04aa3deab8e12a53fddc51baec1edb372 (patch) | |
tree | b8308004963fa0baa56e037034c85a58a0153f70 /src | |
parent | 8e1b3aa798b635c75fa63ca95c1e266d4494d48e (diff) |
don't crash if screen dump fails
Diffstat (limited to 'src')
-rw-r--r-- | src/ScreenDump.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ScreenDump.cxx b/src/ScreenDump.cxx index c0f038e..f331a76 100644 --- a/src/ScreenDump.cxx +++ b/src/ScreenDump.cxx @@ -42,6 +42,9 @@ ScreenDump::~ScreenDump() { int ScreenDump::save(OutputImage *out) { + if (!rgb) + return 1; + out->init(w, h); for (int y = 0; y < h; y++) { |