Selaa lähdekoodia

Mono/C#: Fix crash on exported games that don't use C#

Ignacio Etcheverry 5 vuotta sitten
vanhempi
commit
85d8c42763
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      modules/mono/csharp_script.cpp

+ 2 - 1
modules/mono/csharp_script.cpp

@@ -128,7 +128,8 @@ void CSharpLanguage::init() {
 	print_line("Run this binary with '--generate-mono-glue path/to/modules/mono/glue'");
 	print_line("Run this binary with '--generate-mono-glue path/to/modules/mono/glue'");
 #endif
 #endif
 
 
-	gdmono->initialize_load_assemblies();
+	if (gdmono->is_runtime_initialized())
+		gdmono->initialize_load_assemblies();
 
 
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 	EditorNode::add_init_callback(&_editor_init_callback);
 	EditorNode::add_init_callback(&_editor_init_callback);