Fix existance check when kicking
The effect of this bug was that kicking a non-existant user crashed pidgin. Whoops. Cannot be a 'g_return_if_fail', as that would leave messages looking like errors in the log.
This commit is contained in:
parent
66ce19898c
commit
ceec1a9435
1 changed files with 3 additions and 1 deletions
|
@ -285,7 +285,9 @@ void tgprpl_kick_from_chat (PurpleConnection *gc, int id, const char *who) {
|
|||
g_return_if_fail(P != NULL);
|
||||
|
||||
tgl_peer_t *other_id = tgp_blist_lookup_peer_get (gc_get_tls (gc), who);
|
||||
g_return_if_fail(P != NULL);
|
||||
if (other_id == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
tgl_do_del_user_from_chat (gc_get_tls (gc), P->id, other_id->id, tgp_notify_on_error_gw, NULL);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue