changeset 25867:f1d814126801

Replace the URL registration assertions with regular checks.
author Richard Laager <rlaager@wiktel.com>
date Tue, 02 Dec 2008 18:47:33 +0000
parents b01a7f17a2bb
children ba083e5f633b
files pidgin/gtkimhtml.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);