aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-26 03:48:18 -0400
committerDavid Robillard <d@drobilla.net>2016-07-26 03:48:18 -0400
commit3cd84b539098a94154039d29d72499919785620e (patch)
tree26e8b69222420791ca974fe06573cfca7d34a5c4 /plugins
parentaf2e9f4ca136533f5e1189b670524d0ab1cc5924 (diff)
downloadlv2-3cd84b539098a94154039d29d72499919785620e.tar.xz
Fix handling of Get and Set with NULL subject
Diffstat (limited to 'plugins')
-rw-r--r--plugins/eg-params.lv2/params.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/plugins/eg-params.lv2/params.c b/plugins/eg-params.lv2/params.c
index 356fda3..d151615 100644
--- a/plugins/eg-params.lv2/params.c
+++ b/plugins/eg-params.lv2/params.c
@@ -1,6 +1,6 @@
/*
LV2 Parameter Example Plugin
- Copyright 2014-2015 David Robillard <d@drobilla.net>
+ Copyright 2014-2016 David Robillard <d@drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -514,8 +514,9 @@ restore(LV2_Handle instance,
static inline bool
subject_is_plugin(Params* self, const LV2_Atom_URID* subject)
{
- return (subject && subject->atom.type == self->uris.atom_URID &&
- subject->body != self->uris.plugin);
+ // This simple plugin only supports one subject: itself
+ return (!subject || (subject->atom.type == self->uris.atom_URID &&
+ subject->body == self->uris.plugin));
}
static void