Fixed a crash if no Tox identities exist.

This commit is contained in:
Håvard Pettersson 2014-09-08 03:01:12 +02:00
parent 9486ffae81
commit 026b43e599

View file

@ -20,6 +20,9 @@ bar_item_away(void *data,
{ {
struct t_tox_weechat_identity *identity = tox_weechat_identity_for_buffer(buffer); struct t_tox_weechat_identity *identity = tox_weechat_identity_for_buffer(buffer);
if (!identity)
return NULL;
char *status = NULL;; char *status = NULL;;
switch (tox_get_self_user_status(identity->tox)) switch (tox_get_self_user_status(identity->tox))
{ {