From efeaba832d955e2a31add33e87b7c8cb8aa053f3 Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 27 Oct 2014 13:56:32 -0400 Subject: c++ - don't test if pointer is nullptr before deleting --- src/util/image.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/util') diff --git a/src/util/image.cpp b/src/util/image.cpp index 4cbecc8c2b..ffa65bf0ba 100644 --- a/src/util/image.cpp +++ b/src/util/image.cpp @@ -172,8 +172,5 @@ Image::Image(const std::string &data, bool flip) { } Image::~Image() { - if (img) { - ::operator delete(img); - img = nullptr; - } + ::operator delete(img),img = nullptr; } -- cgit v1.2.1