summaryrefslogtreecommitdiffstats
path: root/ingen/DataAccess.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-03-26 12:25:48 +0200
committerDavid Robillard <d@drobilla.net>2017-03-26 17:02:09 +0200
commitcfb016163227560932044b73407ae9dafa54b4ba (patch)
treec510f0535616bfe776b80021478c5c0be607cec9 /ingen/DataAccess.hpp
parentd70ddd35cc03b35d3b765079d6039fef7a2a19fa (diff)
downloadingen-cfb016163227560932044b73407ae9dafa54b4ba.tar.gz
ingen-cfb016163227560932044b73407ae9dafa54b4ba.tar.bz2
ingen-cfb016163227560932044b73407ae9dafa54b4ba.zip
Remove Node::instance() method
Diffstat (limited to 'ingen/DataAccess.hpp')
-rw-r--r--ingen/DataAccess.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/ingen/DataAccess.hpp b/ingen/DataAccess.hpp
index 149daec9..730cf921 100644
--- a/ingen/DataAccess.hpp
+++ b/ingen/DataAccess.hpp
@@ -17,6 +17,7 @@
#ifndef INGEN_ENGINE_DATAACCESS_HPP
#define INGEN_ENGINE_DATAACCESS_HPP
+#include "ingen/EngineBase.hpp"
#include "ingen/LV2Features.hpp"
#include "ingen/Store.hpp"
#include "ingen/World.hpp"
@@ -35,12 +36,16 @@ struct DataAccess : public Ingen::LV2Features::Feature
const char* uri() const { return "http://lv2plug.in/ns/ext/data-access"; }
SPtr<LV2_Feature> feature(World* world, Node* node) {
+ if (!world->engine()) {
+ return SPtr<LV2_Feature>();
+ }
+
Node* store_node = world->store()->get(node->path());
if (!store_node) {
return SPtr<LV2_Feature>();
}
- LilvInstance* inst = store_node->instance();
+ LilvInstance* inst = world->engine()->block_instance(store_node);
if (!inst) {
return SPtr<LV2_Feature>();
}