diff options
author | dequis <dx@dxzone.com.ar> | 2016-09-28 00:56:39 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-09-28 00:56:39 -0300 |
commit | ff468a7ad739bbde90000de3f9019833eba89012 (patch) | |
tree | 047d62db783d19ec7752f261eb0f88524af836bb | |
parent | 1a8875ffaae873853fd8537cdce43e35e9889266 (diff) |
Fix crash when setting away in protocols with null away_states list
Like funyahoo++, which has online and offline statuses, but bitlbee's
purple filters those out, resulting in an empty list, and boom.
It's ugly enough that I think I'll add a workaround to the plugin too.
-rw-r--r-- | protocols/nogaim.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/protocols/nogaim.c b/protocols/nogaim.c index ab11508b..d6d2e8e3 100644 --- a/protocols/nogaim.c +++ b/protocols/nogaim.c @@ -711,6 +711,9 @@ int imc_away_send_update(struct im_connection *ic) : set_getstr(&ic->bee->set, "away"); if (away && *away) { GList *m = ic->acc->prpl->away_states(ic); + if (m == NULL) { + return 0; + } msg = ic->acc->flags & ACC_FLAG_AWAY_MESSAGE ? away : NULL; away = imc_away_state_find(m, away, &msg) ? : (imc_away_state_find(m, "away", &msg) ? : m->data); |