--- 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 ) {