From a3744864522c94e8ed87af04544399ae6589e6bf Mon Sep 17 00:00:00 2001
From: Jonathan Wilkes <jon.w.wilkes@gmail.com>
Date: Sat, 12 Aug 2017 23:21:08 -0400
Subject: [PATCH] check for empty symbol instead of NULL symbol arg, remove
 unnecessary static global init

---
 externals/plugin~/plugin~.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/externals/plugin~/plugin~.c b/externals/plugin~/plugin~.c
index 7d79915f8..03f808444 100644
--- a/externals/plugin~/plugin~.c
+++ b/externals/plugin~/plugin~.c
@@ -59,7 +59,7 @@ static void plugin_tilde_poplocale (void) {}
 
 static int plugin_tilde_have_plugin(Pd_Plugin_Tilde* x);
 
-static t_class* plugin_tilde_class = NULL;
+static t_class* plugin_tilde_class;
 
 void plugin_tilde_setup (void)
 {
@@ -109,7 +109,7 @@ static void* plugin_tilde_new (t_symbol* s_name, t_symbol* s_lib_name)
   x->dsp_vec_length = 0;
   x->dsp_active = 0;
 
-  if (s_name->s_name != NULL) {
+  if (s_name != &s_) {
     if (s_lib_name->s_name == NULL || strlen (s_lib_name->s_name) == 0)
       x->plugin_library_filename = plugin_tilde_search_plugin (x, s_name->s_name);
     else
-- 
GitLab