diff --git a/src/fmod_cache.cpp b/src/fmod_cache.cpp index bc874b5c..e8f49a68 100644 --- a/src/fmod_cache.cpp +++ b/src/fmod_cache.cpp @@ -80,11 +80,11 @@ Ref FmodCache::get_bank(const String& bankPath) { uint32_t FmodCache::add_plugin(const String& p_plugin_path, uint32_t p_priority) { uint32_t handle; #if defined(ANDROID_ENABLED) && !defined(TOOLS_ENABLED) - const char* plugin_path = p_plugin_path.utf8().get_data(); + const CharString plugin_path_utf8 = p_plugin_path.utf8(); #else - const char* plugin_path = ProjectSettings::get_singleton()->globalize_path(p_plugin_path).utf8().get_data(); + const CharString plugin_path_utf8 = ProjectSettings::get_singleton()->globalize_path(p_plugin_path).utf8(); #endif - ERROR_CHECK(core_system->loadPlugin(plugin_path, &handle, p_priority)); + ERROR_CHECK(core_system->loadPlugin(plugin_path_utf8.get_data(), &handle, p_priority)); plugin_handles.append(handle); return handle; }