diff options
author | artemp <artem@mapnik.org> | 2014-10-27 13:56:32 -0400 |
---|---|---|
committer | artemp <artem@mapnik.org> | 2014-10-27 14:18:11 -0400 |
commit | efeaba832d955e2a31add33e87b7c8cb8aa053f3 (patch) | |
tree | de2aa6b0bcd1ab0f92919f8c13a57d1cc40a3747 /src | |
parent | 95213cd3829fb2565c8b492c7eeb44a421df7bc7 (diff) | |
download | qtlocation-mapboxgl-efeaba832d955e2a31add33e87b7c8cb8aa053f3.tar.gz |
c++ - don't test if pointer is nullptr before deleting
Diffstat (limited to 'src')
-rw-r--r-- | src/util/image.cpp | 5 |
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; } |