From 6d0a57c9fd0e3dd09b69864172fd960da6b0eb3b Mon Sep 17 00:00:00 2001 From: David Snopek Date: Thu, 29 Aug 2024 09:50:56 -0500 Subject: [PATCH] Fix loading GDExtensions in exported games --- core/extension/gdextension.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/core/extension/gdextension.cpp b/core/extension/gdextension.cpp index c9e609cddc7..e764b9c1125 100644 --- a/core/extension/gdextension.cpp +++ b/core/extension/gdextension.cpp @@ -678,12 +678,10 @@ Error GDExtension::open_library(const String &p_path, const Refglobalize_path(p_path); + Error err = loader->open_library(p_path); - Error err = loader->open_library(abs_path); - - ERR_FAIL_COND_V_MSG(err == ERR_FILE_NOT_FOUND, err, "GDExtension dynamic library not found: " + abs_path); - ERR_FAIL_COND_V_MSG(err != OK, err, "Can't open GDExtension dynamic library: " + abs_path); + ERR_FAIL_COND_V_MSG(err == ERR_FILE_NOT_FOUND, err, "GDExtension dynamic library not found: " + p_path); + ERR_FAIL_COND_V_MSG(err != OK, err, "Can't open GDExtension dynamic library: " + p_path); err = loader->initialize(&gdextension_get_proc_address, this, &initialization);