summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-05-04 03:42:35 +0000
committerDavid Robillard <d@drobilla.net>2008-05-04 03:42:35 +0000
commit437ef13d0f2bd712e1aece745a88917317b94335 (patch)
tree177b47bf02f8f44f8b966c2924c5e7be78f2818d /src
parent77b6f2a6a7b37e22323c4a0d80713f6cc8a231d7 (diff)
downloadingen-437ef13d0f2bd712e1aece745a88917317b94335.tar.gz
ingen-437ef13d0f2bd712e1aece745a88917317b94335.tar.bz2
ingen-437ef13d0f2bd712e1aece745a88917317b94335.zip
Use global RDF world when loading a patch (fix crashes when using ingen -el).
git-svn-id: http://svn.drobilla.net/lad/ingen@1198 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/progs/ingen/main.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/progs/ingen/main.cpp b/src/progs/ingen/main.cpp
index 014c24c9..57380250 100644
--- a/src/progs/ingen/main.cpp
+++ b/src/progs/ingen/main.cpp
@@ -78,6 +78,7 @@ main(int argc, char** argv)
SharedPtr<Glib::Module> client_module;
SharedPtr<Glib::Module> gui_module;
SharedPtr<Glib::Module> bindings_module;
+ SharedPtr<Glib::Module> serialisation_module;
SharedPtr<Shared::EngineInterface> engine_interface;
@@ -85,6 +86,14 @@ main(int argc, char** argv)
Ingen::Shared::World* world = Ingen::Shared::get_world();
+ /* Set up RDF world */
+ world->rdf_world->add_prefix("xsd", "http://www.w3.org/2001/XMLSchema#");
+ world->rdf_world->add_prefix("ingen", "http://drobilla.net/ns/ingen#");
+ world->rdf_world->add_prefix("ingenuity", "http://drobilla.net/ns/ingenuity#");
+ world->rdf_world->add_prefix("lv2", "http://lv2plug.in/ns/lv2core#");
+ world->rdf_world->add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#");
+ world->rdf_world->add_prefix("doap", "http://usefulinc.com/ns/doap#");
+
/* Run engine */
if (args.engine_flag) {
@@ -147,21 +156,12 @@ main(int argc, char** argv)
/* Load a patch */
if (args.load_given && engine_interface) {
- Redland::World rdf_world;
- rdf_world.add_prefix("xsd", "http://www.w3.org/2001/XMLSchema#");
- rdf_world.add_prefix("ingen", "http://drobilla.net/ns/ingen#");
- rdf_world.add_prefix("ingenuity", "http://drobilla.net/ns/ingenuity#");
- rdf_world.add_prefix("lv2", "http://lv2plug.in/ns/lv2core#");
- rdf_world.add_prefix("rdfs", "http://www.w3.org/2000/01/rdf-schema#");
- rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#");
-
boost::optional<Raul::Path> parent_path;
if (args.path_given)
parent_path = args.path_arg;
bool found = false;
- SharedPtr<Glib::Module> serialisation_module
- = Ingen::Shared::load_module("ingen_serialisation");
+ serialisation_module = Ingen::Shared::load_module("ingen_serialisation");
Serialisation::Loader* (*new_loader)() = NULL;
@@ -181,7 +181,7 @@ main(int argc, char** argv)
Glib::get_current_dir(), args.load_arg));
}
- loader->load(engine_interface, &rdf_world, uri, parent_path, "");
+ loader->load(engine_interface, world->rdf_world, uri, parent_path, "");
} else {
cerr << "Unable to load serialisation module, aborting." << endl;
@@ -252,9 +252,10 @@ main(int argc, char** argv)
engine.reset();
}
- engine_module.reset();
client_module.reset();
+ serialisation_module.reset();
gui_module.reset();
+ engine_module.reset();
Ingen::Shared::destroy_world();