Skip to content

Fix PluginService segfault at initialize when LD_LIBRARY_PATH is not defined

Marco Clemencic requested to merge fix-plugin-service-segfault into master

I noticed by chance that when LD_LIBRARY_PATH is not defined and the PluginService is initialized we get a segfault.

This happens because I had (the equivalent of)

std::string_view s{std::getenv("LD_LIBRARY_PATH")};

but std::getenv returns nullptr if the variable is not defined and std::string_view{nullptr} segfaults.

Merge request reports