[gjs: 37/45] [cairo] Check status for surface methods



commit 57c8c1f96596a5aa8ba6f0793ceaae5525598f50
Author: Johan Dahlin <johan gnome org>
Date:   Tue Mar 2 14:43:28 2010 -0300

    [cairo] Check status for surface methods

 modules/cairo-surface.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/modules/cairo-surface.c b/modules/cairo-surface.c
index 2b5fd80..97d6edd 100644
--- a/modules/cairo-surface.c
+++ b/modules/cairo-surface.c
@@ -76,6 +76,9 @@ writeToPNG_func(JSContext *context,
     }
     cairo_surface_write_to_png(surface, filename);
     g_free(filename);
+    if (!gjs_cairo_check_status(context, cairo_surface_status(surface),
+                                "surface"))
+        return JS_TRUE;
     return JS_TRUE;
 }
 
@@ -96,6 +99,9 @@ getType_func(JSContext *context,
 
     surface = gjs_cairo_surface_get_surface(context, object);
     type = cairo_surface_get_type(surface);
+    if (!gjs_cairo_check_status(context, cairo_surface_status(surface),
+                                "surface"))
+        return JS_TRUE;
 
     *retval = INT_TO_JSVAL(type);
     return JS_TRUE;



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