Fix crash when notification backend fails

Most notably on Win7
This commit is contained in:
Patrick Griffis 2017-06-26 17:37:55 -04:00
parent de157fcffd
commit 8f2429a2d2

View File

@ -177,6 +177,12 @@ int
notification_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **plugin_desc, char **plugin_version, char *arg)
{
const char* error = NULL;
ph = plugin_handle;
*plugin_name = "";
*plugin_desc = "";
*plugin_version = "";
if (!notification_backend_init (&error))
{
if (error)
@ -184,11 +190,6 @@ notification_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, cha
return 0;
}
ph = plugin_handle;
*plugin_name = "";
*plugin_desc = "";
*plugin_version = "";
hexchat_hook_print (ph, "Channel Msg Hilight", HEXCHAT_PRI_LOWEST, incoming_hilight_cb, NULL);
hexchat_hook_print (ph, "Channel Action Hilight", HEXCHAT_PRI_LOWEST, incoming_hilight_cb, NULL);