summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-05-18 12:01:19 +0200
committerKonstantin Käfer <mail@kkaefer.com>2017-05-19 14:13:07 +0200
commitd664a3e05ebed51c19dc4adb30850792d5bf8f57 (patch)
tree9b3419e3e5a75706ceb3c06d788bedb1e9088121 /src
parent281d3d4f8cf10910e04131c8020fff0f2e359aa9 (diff)
downloadqtlocation-mapboxgl-d664a3e05ebed51c19dc4adb30850792d5bf8f57.tar.gz
[core] leave Image objects in a valid state after premultiply/unpremultiply
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/util/premultiply.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mbgl/util/premultiply.cpp b/src/mbgl/util/premultiply.cpp
index 219273d7cc..d9fb2480de 100644
--- a/src/mbgl/util/premultiply.cpp
+++ b/src/mbgl/util/premultiply.cpp
@@ -9,6 +9,7 @@ PremultipliedImage premultiply(UnassociatedImage&& src) {
PremultipliedImage dst;
dst.size = src.size;
+ src.size = { 0, 0 };
dst.data = std::move(src.data);
uint8_t* data = dst.data.get();
@@ -29,6 +30,7 @@ UnassociatedImage unpremultiply(PremultipliedImage&& src) {
UnassociatedImage dst;
dst.size = src.size;
+ src.size = { 0, 0 };
dst.data = std::move(src.data);
uint8_t* data = dst.data.get();