From 14d328facab9867f61e9b7c3e26eb62d7ccdb2e3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 27 Nov 2013 19:44:54 +0100 Subject: GRAPHICS: Fix SharedPtrSurfaceDeleter for nullptr inputs. --- graphics/surface.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } }; -- cgit v1.2.3