aboutsummaryrefslogtreecommitdiff
path: root/graphics/surface.h
diff options
context:
space:
mode:
authorKamil Zbróg2013-12-02 12:45:34 +0000
committerKamil Zbróg2013-12-02 12:45:34 +0000
commitf19f61a56da04e0dbd6e46ff9a303fdfb68d8390 (patch)
treeb10cbf38568e8cace510308ce0893541719ee775 /graphics/surface.h
parent0f013bf6e1bed6a1e18aa1a4ea16ed1c0105f33d (diff)
parentccc92b2e707643915efc575cd43fdd11169dc733 (diff)
downloadscummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.tar.gz
scummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.tar.bz2
scummvm-rg350-f19f61a56da04e0dbd6e46ff9a303fdfb68d8390.zip
Merge remote-tracking branch 'sync/master' into prince-malik
Diffstat (limited to 'graphics/surface.h')
-rw-r--r--graphics/surface.h4
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;
}
};