Skip to content

Commit de7d0f8

Browse files
authored
Assume CustomGeometrySource is cancelled when peer is null (#3933)
1 parent 16544a0 commit de7d0f8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

platform/android/MapLibreAndroid/src/cpp/style/sources/custom_geometry_source.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,9 @@ bool CustomGeometrySource::isCancelled(jni::jint z, jni::jint x, jni::jint y) {
126126
static auto& javaClass = jni::Class<CustomGeometrySource>::Singleton(*_env);
127127
static auto isCancelled = javaClass.GetMethod<jboolean(jni::jint, jni::jint, jni::jint)>(*_env, "isCancelled");
128128

129-
assert(javaPeer);
129+
if (!javaPeer) {
130+
return true;
131+
}
130132

131133
auto peer = jni::Cast(*_env, javaClass, javaPeer);
132134
return peer.Call(*_env, isCancelled, z, x, y);

0 commit comments

Comments
 (0)