diff options
Diffstat (limited to 'src/mbgl/style/layers/custom_layer.cpp')
-rw-r--r-- | src/mbgl/style/layers/custom_layer.cpp | 4 |
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 { |