Assume CustomGeometrySource is cancelled when peer is null (#3933)

This commit is contained in:
Jakob Gillich
2025-11-10 15:11:26 +01:00
committed by GitHub
parent 16544a039c
commit de7d0f8248

View File

@@ -126,7 +126,9 @@ bool CustomGeometrySource::isCancelled(jni::jint z, jni::jint x, jni::jint y) {
static auto& javaClass = jni::Class<CustomGeometrySource>::Singleton(*_env);
static auto isCancelled = javaClass.GetMethod<jboolean(jni::jint, jni::jint, jni::jint)>(*_env, "isCancelled");
assert(javaPeer);
if (!javaPeer) {
return true;
}
auto peer = jni::Cast(*_env, javaClass, javaPeer);
return peer.Call(*_env, isCancelled, z, x, y);