Silence warning from changing status of the demo protocol

Sat, 12 Mar 2022 15:09:42 -0600

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Sat, 12 Mar 2022 15:09:42 -0600
changeset 41282
c47df057a426
parent 41281
aa8fc0497d6d
child 41283
8da781550c96

Silence warning from changing status of the demo protocol

Testing Done:
Changed status with a demo account enabled and saw no casting criticals.

Reviewed at https://reviews.imfreedom.org/r/1330/

libpurple/protocols.c file | annotate | diff | comparison | revisions
--- a/libpurple/protocols.c	Fri Mar 11 03:29:48 2022 -0600
+++ b/libpurple/protocols.c	Sat Mar 12 15:09:42 2022 -0600
@@ -312,8 +312,9 @@
 	protocol = purple_protocol_manager_find(manager,
 	                                        purple_account_get_protocol_id(account));
 
-	if (protocol == NULL)
+	if (!PURPLE_IS_PROTOCOL_SERVER(protocol)) {
 		return;
+	}
 
 	if(!purple_account_is_disconnected(account)) {
 		purple_protocol_server_set_status(PURPLE_PROTOCOL_SERVER(protocol),

mercurial