]> Nishi Git Mirror - gwion.git/commitdiff
:bug: Fix modend bug
authorJérémie Astor <fennecdjay@gmail.com>
Thu, 3 Dec 2020 05:54:21 +0000 (06:54 +0100)
committerJérémie Astor <fennecdjay@gmail.com>
Thu, 3 Dec 2020 05:54:21 +0000 (06:54 +0100)
src/plug.c

index 81080c02ae897568a3dfa472baef2b81687ecaea..32e6c1129c3c8cb623c50ffde923517a39d97b7b 100644 (file)
@@ -95,7 +95,7 @@ void free_plug(const struct Gwion_ *gwion) {
   for(m_uint i = 0; i < map_size(map); ++i) {
     const Plug plug = (Plug)VVAL(map, i);
     const modend end = DLSYM(plug->dl, modend, GWMODEND_NAME);
-    if(end)
+    if(end && plg->self)
       end(gwion, plug->self);
     free((m_str)VKEY(map, i));
     DLCLOSE(plug->dl);