diff --git a/pd/src/g_scalar.c b/pd/src/g_scalar.c
index 1cc3bff76b7c4401576b83cc180cd3f7ef9c55d3..fa4764c2a838a0b0f4e0c7a58af9562f7b330afd 100644
--- a/pd/src/g_scalar.c
+++ b/pd/src/g_scalar.c
@@ -1014,7 +1014,8 @@ static void scalar_vis(t_gobj *z, t_glist *owner, int vis)
         sprintf(tagbuf, "scalar%lx", (long unsigned int)x->sc_vec);
         gui_vmess("gui_scalar_erase", "xs",
             glist_getcanvas(owner), tagbuf);
-        pd_unbind(&x->sc_gobj.g_pd, gensym(buf));
+        if (gensym(buf)->s_thing)
+            pd_unbind(&x->sc_gobj.g_pd, gensym(buf));
     }
 
     sys_unqueuegui(x);