From 15efdf68b7de2cf4c96fb8151f7adb9f43567475 Mon Sep 17 00:00:00 2001 From: Jurriaan Mous Date: Tue, 16 Apr 2024 17:21:25 +0200 Subject: [PATCH] Fix possible crashes with validation if type is not correct --- .../commonMain/kotlin/maryk/core/query/changes/IncMapChange.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/commonMain/kotlin/maryk/core/query/changes/IncMapChange.kt b/core/src/commonMain/kotlin/maryk/core/query/changes/IncMapChange.kt index d755ea59..85e06091 100644 --- a/core/src/commonMain/kotlin/maryk/core/query/changes/IncMapChange.kt +++ b/core/src/commonMain/kotlin/maryk/core/query/changes/IncMapChange.kt @@ -42,7 +42,7 @@ data class IncMapChange internal constructor( try { mapDefinition.valueDefinition.validateWithRef(null, value) { @Suppress("UNCHECKED_CAST") - mapDefinition.anyValueRef(reference) as IsPropertyReferenceForValues + mapDefinition.anyValueRef(reference) as? IsPropertyReferenceForValues } } catch (e: ValidationException) { addException(e)