From 1d4fdefd2783e8d61f844f1bf037e4a8559c3de6 Mon Sep 17 00:00:00 2001 From: Alex Cristici Date: Wed, 17 Apr 2024 00:05:48 +0300 Subject: [PATCH] Present drawable null check (#2272) --- platform/ios/src/MLNMapView+Metal.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/ios/src/MLNMapView+Metal.mm b/platform/ios/src/MLNMapView+Metal.mm index eb9ff5b38..45498f92d 100644 --- a/platform/ios/src/MLNMapView+Metal.mm +++ b/platform/ios/src/MLNMapView+Metal.mm @@ -79,7 +79,9 @@ public: void swap() override { id currentDrawable = [mtlView currentDrawable]; - [commandBuffer presentDrawable:currentDrawable]; + if (currentDrawable) { + [commandBuffer presentDrawable:currentDrawable]; + } [commandBuffer commit]; // Un-comment for synchronous, which can help troubleshoot rendering problems,