backend: Ensure that Cogl drivers are set prior to initialization

It doesn't make sense for the allowed drivers to be changed after
Clutter has been initialized.
This commit is contained in:
Emmanuele Bassi 2015-12-11 15:39:04 +00:00
parent 10b74e7005
commit 6d0d1deda2

View File

@ -1563,5 +1563,11 @@ _clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend)
void void
clutter_set_allowed_drivers (const char *drivers) clutter_set_allowed_drivers (const char *drivers)
{ {
if (_clutter_context_is_initialized ())
{
g_warning ("Clutter has already been initialized.\n");
return;
}
allowed_drivers = g_strdup (drivers); allowed_drivers = g_strdup (drivers);
} }