summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorartemp <artem@mapnik.org>2014-10-27 13:56:32 -0400
committerartemp <artem@mapnik.org>2014-10-27 14:18:11 -0400
commitefeaba832d955e2a31add33e87b7c8cb8aa053f3 (patch)
treede2aa6b0bcd1ab0f92919f8c13a57d1cc40a3747 /src
parent95213cd3829fb2565c8b492c7eeb44a421df7bc7 (diff)
downloadqtlocation-mapboxgl-efeaba832d955e2a31add33e87b7c8cb8aa053f3.tar.gz
c++ - don't test if pointer is nullptr before deleting
Diffstat (limited to 'src')
-rw-r--r--src/util/image.cpp5
1 files changed, 1 insertions, 4 deletions
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;
}