fix assertion error in notifyplugin_run

descriptor lookup can return NULL and the result should be checked.