libpurple/protocols.c

changeset 38200
324fe1dc33ac
parent 37679
6ff708c38c04
child 38240
0552f69f1996
--- a/libpurple/protocols.c	Mon Dec 12 18:28:46 2016 -0600
+++ b/libpurple/protocols.c	Mon Dec 12 18:33:27 2016 -0600
@@ -794,8 +794,6 @@
 	}
 
 	protocol = g_object_new(protocol_type, NULL);
-	klass = PURPLE_PROTOCOL_GET_CLASS(protocol);
-
 	if (!protocol) {
 		g_set_error(error, PURPLE_PROTOCOLS_DOMAIN, 0,
 		            _("Could not create protocol instance"));
@@ -820,6 +818,8 @@
 	}
 
 	/* Make sure the protocol implements the required functions */
+	klass = PURPLE_PROTOCOL_GET_CLASS(protocol);
+
 	if (!klass->login        || !klass->close    ||
 	    !klass->status_types || !klass->list_icon )
 	{

mercurial