diff --git a/BeefLibs/corlib/src/Variant.bf b/BeefLibs/corlib/src/Variant.bf index 0aed61ad..763c6b16 100644 --- a/BeefLibs/corlib/src/Variant.bf +++ b/BeefLibs/corlib/src/Variant.bf @@ -293,7 +293,7 @@ namespace System obj = (T)Internal.UnsafeCastToObject(*(void**)(void*)mData); else obj = (T)Internal.UnsafeCastToObject((void*)mData); - Debug.Assert(obj.GetType().IsSubtypeOf(type)); + Debug.Assert(obj == null || obj.GetType().IsSubtypeOf(type)); return obj; }