summaryrefslogtreecommitdiff
path: root/src/mbgl/style/layers/custom_layer.cpp
diff options
context:
space:
mode:
authorJulian Rex <julian.rex@mapbox.com>2018-03-23 16:12:34 -0400
committerJulian Rex <julian.rex@mapbox.com>2018-03-23 16:12:34 -0400
commit9b3d5272e78a3b6e8d6539d242519df3b7792acb (patch)
tree14ad0c355896d3dd779e90219cf21882edf4ba2d /src/mbgl/style/layers/custom_layer.cpp
parent038915a94019c4cf1c324becc01b1f3abf7905f4 (diff)
downloadqtlocation-mapboxgl-9b3d5272e78a3b6e8d6539d242519df3b7792acb.tar.gz
Updates to macos and tests for previous changes.upstream/jrex-custom-layer-style-changed-leak-3
Diffstat (limited to 'src/mbgl/style/layers/custom_layer.cpp')
-rw-r--r--src/mbgl/style/layers/custom_layer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/style/layers/custom_layer.cpp b/src/mbgl/style/layers/custom_layer.cpp
index 4f69ce8b52..eeb7dd384d 100644
--- a/src/mbgl/style/layers/custom_layer.cpp
+++ b/src/mbgl/style/layers/custom_layer.cpp
@@ -10,7 +10,8 @@ CustomLayer::~CustomLayer()
printf("~CustomLayer destructor %p\n", this);
// Need to set rawLayer to nil in the obj-c layer.
- onDestruction();
+ if (onDestruction)
+ onDestruction();
}
CustomLayer::CustomLayer(const std::string& layerID,
@@ -18,7 +19,6 @@ CustomLayer::CustomLayer(const std::string& layerID,
Layer(makeMutable<Impl>(layerID, std::move(context)))
{
printf("CustomLayer::CustomLayer %p\n", this);
-
}
const CustomLayer::Impl& CustomLayer::impl() const {