From 8f2429a2d2064ec7cb4e28669f42b37610244c6a Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Mon, 26 Jun 2017 17:37:55 -0400 Subject: Fix crash when notification backend fails Most notably on Win7 --- src/fe-gtk/plugin-notification.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/fe-gtk') diff --git a/src/fe-gtk/plugin-notification.c b/src/fe-gtk/plugin-notification.c index 47ba55ab..3ac89244 100644 --- a/src/fe-gtk/plugin-notification.c +++ b/src/fe-gtk/plugin-notification.c @@ -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); -- cgit 1.4.1