diff options
author | Johannes Schickel | 2013-11-27 19:44:54 +0100 |
---|---|---|
committer | Johannes Schickel | 2013-11-27 19:44:54 +0100 |
commit | 14d328facab9867f61e9b7c3e26eb62d7ccdb2e3 (patch) | |
tree | a50418884d266336968036841ea4ed3d9f31b5fe /graphics | |
parent | 10def6a4353a081871065ed5622023e6f4f865bb (diff) | |
download | scummvm-rg350-14d328facab9867f61e9b7c3e26eb62d7ccdb2e3.tar.gz scummvm-rg350-14d328facab9867f61e9b7c3e26eb62d7ccdb2e3.tar.bz2 scummvm-rg350-14d328facab9867f61e9b7c3e26eb62d7ccdb2e3.zip |
GRAPHICS: Fix SharedPtrSurfaceDeleter for nullptr inputs.
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/surface.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/graphics/surface.h b/graphics/surface.h index 07e289b0bb..f1b2aa64ab 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -334,7 +334,9 @@ public: */ struct SharedPtrSurfaceDeleter { void operator()(Surface *ptr) { - ptr->free(); + if (ptr) { + ptr->free(); + } delete ptr; } }; |