From 09cddbd89be960c40c3c3ddfca9adf996831acb1 Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Sun, 14 Sep 2008 16:23:10 +0000
Subject: Fix crash on load location.

git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1495 a436a847-0d15-0410-975c-d299462d15a1
---
 src/libs/gui/ThreadedLoader.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp
index 24edc69a..008b14c4 100644
--- a/src/libs/gui/ThreadedLoader.cpp
+++ b/src/libs/gui/ThreadedLoader.cpp
@@ -108,7 +108,7 @@ ThreadedLoader::load_patch(bool                    merge,
 				engine_base = engine_parent.get().base();
 		}
 		
-		if (merge && (engine_parent.get() == "/" || !engine_parent))
+		if (merge && (!engine_parent || engine_parent.get() == "/"))
 			engine_base = engine_base.substr(0, engine_base.find_last_of("/"));
 		
 		_events.push_back(sigc::hide_return(sigc::bind(
-- 
cgit v1.2.1