mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-28 02:21:25 +00:00
code: Throw an error on nullptr for util::library::load
This commit is contained in:
parent
50c85608c3
commit
25ba51df12
1 changed files with 4 additions and 0 deletions
|
@ -102,6 +102,10 @@ std::shared_ptr<::streamfx::util::library> streamfx::util::library::load(std::st
|
|||
|
||||
std::shared_ptr<::streamfx::util::library> streamfx::util::library::load(obs_module_t* instance)
|
||||
{
|
||||
if (!instance) {
|
||||
throw std::runtime_error("Can't load nullptr as a library.");
|
||||
}
|
||||
|
||||
// Get an absolute path to the module.
|
||||
auto path = std::filesystem::absolute(std::filesystem::u8path(obs_get_module_binary_path(instance)));
|
||||
|
||||
|
|
Loading…
Reference in a new issue