[clutter] backend: Ensure that Cogl drivers are set prior to initialization



commit 6d0d1deda2c75535f162253ae8b6787a2c885f71
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Fri Dec 11 15:39:04 2015 +0000

    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.

 clutter/clutter-backend.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-backend.c b/clutter/clutter-backend.c
index 0d083ce..a29976a 100644
--- a/clutter/clutter-backend.c
+++ b/clutter/clutter-backend.c
@@ -1563,5 +1563,11 @@ _clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend)
 void
 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);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]