pidgin/pidgin

Fix coverity 1297388

2016-12-12, Gary Kramlich
324fe1dc33ac
Parents 8fe1c3be007c
Children ee5f6e1f76bb
Fix coverity 1297388
--- 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 )
{