summaryrefslogtreecommitdiffstats
path: root/src/UIFile.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-01-09 20:05:06 +0000
committerDavid Robillard <d@drobilla.net>2015-01-09 20:05:06 +0000
commit4067bd81444736ddd7047210e2afdaaf9eaeaf40 (patch)
tree5cd70895cc5f4247996c321e044dfec7d063e9c7 /src/UIFile.hpp
parent1dff3fea90f2dc43a8bfc782eb88512344c1b5ae (diff)
downloadpatchage-4067bd81444736ddd7047210e2afdaaf9eaeaf40.tar.gz
patchage-4067bd81444736ddd7047210e2afdaaf9eaeaf40.tar.bz2
patchage-4067bd81444736ddd7047210e2afdaaf9eaeaf40.zip
Fix OSX integration.
git-svn-id: http://svn.drobilla.net/lad/trunk/patchage@5504 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/UIFile.hpp')
-rw-r--r--src/UIFile.hpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/UIFile.hpp b/src/UIFile.hpp
index a9ff0d5..561cb0f 100644
--- a/src/UIFile.hpp
+++ b/src/UIFile.hpp
@@ -40,14 +40,11 @@ public:
static Glib::RefPtr<Gtk::Builder> open(const std::string& base_name) {
std::string ui_filename;
- char* loc = NULL;
#ifdef PATCHAGE_BINLOC
- loc = binary_location();
- if (loc) {
- std::string bundle = loc;
+ std::string bundle = binary_location();
+ if (!bundle.empty()) {
bundle = bundle.substr(0, bundle.find_last_of("/"));
ui_filename = bundle + "/" + base_name + ".ui";
- free(loc);
if (is_readable(ui_filename)) {
std::cout << "Loading UI file " << ui_filename << std::endl;
return Gtk::Builder::create_from_file(ui_filename);