1
0
Fork 0

meta-plugin-manager: Guard against a NULL start vfunc

The default plugin has no such vfunc.

https://bugzilla.gnome.org/show_bug.cgi?id=678238
This commit is contained in:
Jasper St. Pierre 2012-06-17 00:56:48 -04:00
parent 1478510392
commit f5e48223c9

View file

@ -89,12 +89,17 @@ MetaPluginManager *
meta_plugin_manager_new (MetaScreen *screen)
{
MetaPluginManager *plugin_mgr;
MetaPluginClass *klass;
MetaPlugin *plugin;
plugin_mgr = g_new0 (MetaPluginManager, 1);
plugin_mgr->screen = screen;
plugin_mgr->plugin = plugin = g_object_new (plugin_type, "screen", screen, NULL);
META_PLUGIN_GET_CLASS (plugin)->start (plugin);
klass = META_PLUGIN_GET_CLASS (plugin);
if (klass->start)
klass->start (plugin);
return plugin_mgr;
}