plugin_host删除时关闭Editor

This commit is contained in:
Nanako 2024-02-28 16:56:51 +08:00
parent 869ec21603
commit 97286e1265
2 changed files with 5 additions and 4 deletions

View File

@ -5,6 +5,7 @@
plugin_host::~plugin_host() {
delete channel;
g_window_manager.destroy_plugin_host_window(this);
}
void plugin_host::try_open_editor() {

View File

@ -14,17 +14,17 @@ public:
}
explicit dynamic_library(const std::string& libraryPath) {
explicit dynamic_library(const std::string& library_path) {
#ifdef _WIN32
hModule = LoadLibraryA(libraryPath.c_str());
hModule = LoadLibraryA(library_path.c_str());
#else
handle = dlopen(libraryPath.c_str(), RTLD_LAZY);
#endif
if (!get_handle()) {
spdlog::error("Failed to load library: {}", libraryPath);
spdlog::error("Failed to load library: {}", library_path);
throw std::runtime_error("Failed to load library");
}
spdlog::info("Load library: {}", libraryPath);
spdlog::info("Load library: {}", library_path);
}
~dynamic_library() {