diff options
Diffstat (limited to 'src/resources/imagewriter.cpp')
-rw-r--r-- | src/resources/imagewriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/resources/imagewriter.cpp b/src/resources/imagewriter.cpp index 5cc8b4d45..bc5fb7905 100644 --- a/src/resources/imagewriter.cpp +++ b/src/resources/imagewriter.cpp @@ -30,6 +30,9 @@ bool ImageWriter::writePNG(SDL_Surface *surface, const std::string &filename) { + if (!surface) + return false; + // TODO Maybe someone can make this look nice? png_structp png_ptr; |