diff options
| author | 0cyn <kat@vector35.com> | 2026-04-15 12:19:40 -0400 |
|---|---|---|
| committer | 0cyn <kat@vector35.com> | 2026-04-15 12:19:40 -0400 |
| commit | 65582278e36dd9905c22a47620c70cf39d8fde63 (patch) | |
| tree | 2cd1119a6776a85298eef215989abc4a007b8dbb /pluginmanager.cpp | |
| parent | b4ccb82ea76b98457d9dc59424632ca412511ed4 (diff) | |
Propegate nullptr on Repository::GetPluginByPath
Diffstat (limited to 'pluginmanager.cpp')
| -rw-r--r-- | pluginmanager.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pluginmanager.cpp b/pluginmanager.cpp index ed409c9a..3e61ea27 100644 --- a/pluginmanager.cpp +++ b/pluginmanager.cpp @@ -352,7 +352,10 @@ vector<Ref<Extension>> Repository::GetPlugins() const Ref<Extension> Repository::GetPluginByPath(const string& pluginPath) { - return new Extension(BNRepositoryGetPluginByPath(m_object, pluginPath.c_str())); + BNPlugin* plugin = BNRepositoryGetPluginByPath(m_object, pluginPath.c_str()); + if (!plugin) + return nullptr; + return new Extension(plugin); } string Repository::GetFullPath() const |
