There's a small race condition here but that's a symptom of the general lack of thread safety for plugin pointers.