summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gc_handle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/mono/mono_gc_handle.cpp')
-rw-r--r--modules/mono/mono_gc_handle.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/mono/mono_gc_handle.cpp b/modules/mono/mono_gc_handle.cpp
index d3ad968135..e10e06df0e 100644
--- a/modules/mono/mono_gc_handle.cpp
+++ b/modules/mono/mono_gc_handle.cpp
@@ -59,6 +59,10 @@ Ref<MonoGCHandle> MonoGCHandle::create_weak(MonoObject *p_object) {
void MonoGCHandle::release() {
+#ifdef DEBUG_ENABLED
+ CRASH_COND(GDMono::get_singleton() == NULL);
+#endif
+
if (!released && GDMono::get_singleton()->is_runtime_initialized()) {
mono_gchandle_free(handle);
released = true;