Logic crash if plug-in removed if editor has been clicked on and not closed

Thanks, Ray.

It looks like all that is needed to prevent the crash is to remove that #if clause, allowing it to call only CFRelease, in all cases, rather than removing both calls.

Any reason that solution might cause a problem? It appears that that is what was the original code, and why someone added the “fix” for OS version 10.11, which instead seems to have broken things. I am using the latest SDK, which would be 10.12 (according to both Xcode target settings and a search of the SDKs inside Xcode).

(By the way, the singleton, which spawns a thread that I was worried about not getting shut down, does indeed still get shut down when the last instance of the plug-in is removed, despite the bundle not being released. It depends on the last effect class instance being destroyed, not the bundle being released, so that (and the copy protection) are fine.)