From 026b43e59973df3627cb7c7f131656519f8cdc8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Pettersson?= Date: Mon, 8 Sep 2014 03:01:12 +0200 Subject: [PATCH] Fixed a crash if no Tox identities exist. --- src/tox-weechat-gui.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tox-weechat-gui.c b/src/tox-weechat-gui.c index 0f6e819..6893125 100644 --- a/src/tox-weechat-gui.c +++ b/src/tox-weechat-gui.c @@ -20,6 +20,9 @@ bar_item_away(void *data, { struct t_tox_weechat_identity *identity = tox_weechat_identity_for_buffer(buffer); + if (!identity) + return NULL; + char *status = NULL;; switch (tox_get_self_user_status(identity->tox)) {