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(-) (limited to 'graphics/surface.h') 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 From 53332e806670cdff27dc0d2faa85cad066a5cdc9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Feb 2014 02:34:20 +0100 Subject: GRAPHICS: Make GPL headers consistent in themselves. --- graphics/surface.h | 1 + 1 file changed, 1 insertion(+) (limited to 'graphics/surface.h') diff --git a/graphics/surface.h b/graphics/surface.h index f1b2aa64ab..d083449854 100644 --- a/graphics/surface.h +++ b/graphics/surface.h @@ -17,6 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * */ #ifndef GRAPHICS_SURFACE_H -- cgit v1.2.3