Bug in AU wrapper?

Hi and many thanks to Jules for this wonderful tool!

My plugin’s UI couln’t open the second time in GarageBand because of the next assertion failure:

AudioProcessorEditor::~AudioProcessorEditor()
{
    // if this fails, then the wrapper hasn't called editorBeingDeleted() on the filter for some reason..
    jassert(owner->getActiveEditor() != this);
}

I may have found a bug in the AU wrapper: The dealloc() function for JuceUIViewClass calls:

instead of:

Besides, it would better correspond to the comment Jules left: “plugin may have been deleted before the UI”

However, this was not enough to fix the bug. I had to replace:

if(activePlugins.contains((void*) au))
	filter->editorBeingDeleted((AudioProcessorEditor*) editorComp->getChildComponent(0));

by:

for(int i=0; i<activePlugins.size(); ++i)
{
	if(activePlugins[i] == au)
	{
		filter->editorBeingDeleted((AudioProcessorEditor*) editorComp->getChildComponent(0));
		break;
	}
}

I’m kind of stunned about this, but it works…[/code]

Thanks for that, but you should always check the tip from GIT before spending time fixing bugs like this - I already fixed this issue a few weeks ago.