summaryrefslogtreecommitdiffstats
path: root/src/server/events
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-10-21 05:16:22 +0000
committerDavid Robillard <d@drobilla.net>2011-10-21 05:16:22 +0000
commitbcc2b2a1032306711591ae59205b81ed67d08387 (patch)
treec98c936b113bc9ea5950877467eaaa8d9c13d62a /src/server/events
parentd0197b2f5fadc55c5ab3bf62e96fef81d753b2de (diff)
downloadingen-bcc2b2a1032306711591ae59205b81ed67d08387.tar.gz
ingen-bcc2b2a1032306711591ae59205b81ed67d08387.tar.bz2
ingen-bcc2b2a1032306711591ae59205b81ed67d08387.zip
Fix running as an LV2 plugin.
Install template bundles for loading Ingen in LV2 hosts. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3555 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/events')
-rw-r--r--src/server/events/Get.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/server/events/Get.cpp b/src/server/events/Get.cpp
index 27bdef92..ae649e1f 100644
--- a/src/server/events/Get.cpp
+++ b/src/server/events/Get.cpp
@@ -64,15 +64,20 @@ Get::post_process()
{
if (_uri == "ingen:plugins") {
_request->respond_ok();
- _engine.broadcaster()->send_plugins_to(_request->client(), _plugins);
+ if (_request->client()) {
+ _engine.broadcaster()->send_plugins_to(_request->client(), _plugins);
+ }
} else if (!_object && !_plugin) {
_request->respond_error("Unable to find object requested.");
} else if (_request->client()) {
_request->respond_ok();
- if (_object)
- ObjectSender::send_object(_request->client(), _object, true);
- else if (_plugin)
- _request->client()->put(_uri, _plugin->properties());
+ if (_request->client()) {
+ if (_object) {
+ ObjectSender::send_object(_request->client(), _object, true);
+ } else if (_plugin) {
+ _request->client()->put(_uri, _plugin->properties());
+ }
+ }
} else {
_request->respond_error("Unable to find client to send object.");
}