From 3cd84b539098a94154039d29d72499919785620e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 26 Jul 2016 03:48:18 -0400 Subject: Fix handling of Get and Set with NULL subject --- plugins/eg-params.lv2/params.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins/eg-params.lv2/params.c') 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 + Copyright 2014-2016 David Robillard 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 -- cgit v1.2.1