[clutter-gst] actor: fix crash if no current frame



commit 90577622f044adb722154ba42a19a81a9a7d56d1
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Tue Apr 23 16:12:36 2013 +0100

    actor: fix crash if no current frame

 clutter-gst/clutter-gst-actor.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/clutter-gst/clutter-gst-actor.c b/clutter-gst/clutter-gst-actor.c
index 9b06255..e5b9f3c 100644
--- a/clutter-gst/clutter-gst-actor.c
+++ b/clutter-gst/clutter-gst-actor.c
@@ -79,7 +79,8 @@ clutter_gst_actor_get_preferred_width (ClutterActor *actor,
   if (min_width)
     *min_width = 0;
   if (nat_width)
-    *nat_width = priv->frame->resolution.width;
+    if (priv->frame)
+      *nat_width = priv->frame->resolution.width;
 }
 
 static void
@@ -93,7 +94,8 @@ clutter_gst_actor_get_preferred_height (ClutterActor *actor,
   if (min_height)
     *min_height = 0;
   if (nat_height)
-    *nat_height = priv->frame->resolution.height;
+    if (priv->frame)
+      *nat_height = priv->frame->resolution.height;
 }
 
 static void


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