summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/gdnative/register_types.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index d809109987..559e9fa455 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -248,7 +248,7 @@ void unregister_gdnative_types() {
memdelete(GDNativeCallRegistry::singleton);
#ifdef TOOLS_ENABLED
- if (Engine::get_singleton()->is_editor_hint()) {
+ if (Engine::get_singleton()->is_editor_hint() && discoverer != NULL) {
memdelete(discoverer);
}
#endif