Replace the URL registration assertions with regular checks. next.minor

Tue, 02 Dec 2008 18:47:33 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Tue, 02 Dec 2008 18:47:33 +0000
branch
next.minor
changeset 25014
5bf71146f93e
parent 25013
956b2f650d31
child 25015
b748dd8a5633

Replace the URL registration assertions with regular checks.

pidgin/gtkimhtml.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkimhtml.c	Tue Dec 02 17:20:53 2008 +0000
+++ b/pidgin/gtkimhtml.c	Tue Dec 02 18:47:33 2008 +0000
@@ -5758,13 +5758,15 @@
 	g_return_val_if_fail(klass, FALSE);
 
 	if ((proto = imhtml_find_protocol(name, TRUE))) {
-		g_return_val_if_fail(!activate, FALSE);
+		if (activate) {
+			return FALSE;
+		}
 		g_free(proto->name);
 		g_free(proto);
 		klass->protocols = g_list_remove(klass->protocols, proto);
 		return TRUE;
-	} else {
-		g_return_val_if_fail(activate, FALSE);
+	} else if (!activate) {
+		return FALSE;
 	}
 
 	proto = g_new0(GtkIMHtmlProtocol, 1);

mercurial