plugin.c: fix potential null pointer dereference