mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-25 10:40:25 +01:00
Only register/remove Terminal once
This commit is contained in:
parent
3bed9e7b0f
commit
e234b14867
1 changed files with 2 additions and 2 deletions
|
@ -9,7 +9,7 @@
|
||||||
using namespace godot;
|
using namespace godot;
|
||||||
|
|
||||||
void initialize_godot_xterm_module(ModuleInitializationLevel p_level) {
|
void initialize_godot_xterm_module(ModuleInitializationLevel p_level) {
|
||||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE || ClassDB::class_exists("Terminal")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ void initialize_godot_xterm_module(ModuleInitializationLevel p_level) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void uninitialize_godot_xterm_module(ModuleInitializationLevel p_level) {
|
void uninitialize_godot_xterm_module(ModuleInitializationLevel p_level) {
|
||||||
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
|
if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE && !ClassDB::class_exists("Terminal")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue