diff options
author | Willem Jan Palenstijn | 2013-04-18 23:34:29 +0200 |
---|---|---|
committer | Willem Jan Palenstijn | 2013-05-08 20:39:44 +0200 |
commit | 01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6 (patch) | |
tree | 544b07f3aa41abe7907bcd2040cdad11ebc324bb /graphics/surface.cpp | |
parent | 9cf2c83e5e5a35816ab153bf8443dac691829ea8 (diff) | |
parent | a41d72a44a660c72fdadbc3a8ef580e5e03cb890 (diff) | |
download | scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.tar.gz scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.tar.bz2 scummvm-rg350-01f3f3a8dd0ad2891939d03b0ce47cbf36ea9bc6.zip |
Merge branch 'master'
Diffstat (limited to 'graphics/surface.cpp')
-rw-r--r-- | graphics/surface.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/graphics/surface.cpp b/graphics/surface.cpp index 0fad25734c..e0b25f22e9 100644 --- a/graphics/surface.cpp +++ b/graphics/surface.cpp @@ -56,8 +56,10 @@ void Surface::create(uint16 width, uint16 height, const PixelFormat &f) { format = f; pitch = w * format.bytesPerPixel; - pixels = calloc(width * height, format.bytesPerPixel); - assert(pixels); + if (width && height) { + pixels = calloc(width * height, format.bytesPerPixel); + assert(pixels); + } } void Surface::free() { |