summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2017-06-26 17:37:55 -0400
committerPatrick Griffis <tingping@tingping.se>2017-06-26 17:49:03 -0400
commit8f2429a2d2064ec7cb4e28669f42b37610244c6a (patch)
treeb38a831e9d0419d534c67cfd9bd2c92da3168757 /src
parentde157fcffdd9ed499cb7d1455059591feb37707d (diff)
Fix crash when notification backend fails
Most notably on Win7
Diffstat (limited to 'src')
-rw-r--r--src/fe-gtk/plugin-notification.c11
1 files changed, 6 insertions, 5 deletions
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);