summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/world.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/world.c b/src/world.c
index 11c5c2e..57bea81 100644
--- a/src/world.c
+++ b/src/world.c
@@ -324,8 +324,12 @@ slv2_world_load_all(SLV2World world)
slv2_world_load_path(world, lv2_path);
} else {
const char* const home = getenv("HOME");
- const char* const suffix = "/.lv2:/usr/local/lib/lv2:/usr/lib/lv2";
- lv2_path = slv2_strjoin(home, suffix, NULL);
+ if (home) {
+ const char* const suffix = "/.lv2:/usr/local/lib/lv2:/usr/lib/lv2";
+ lv2_path = slv2_strjoin(home, suffix, NULL);
+ } else {
+ lv2_path = strdup("/usr/local/lib/lv2:/usr/lib/lv2");
+ }
slv2_world_load_path(world, lv2_path);