[cairo-commit] src/cairo-surface-observer.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Oct 11 05:51:35 PDT 2011


 src/cairo-surface-observer.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 88a1b83177ecaf044a3425abc8faa571ca2b41f5
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Oct 11 13:49:36 2011 +0100

    observer: Fix typo and handle the condition of no script device
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/cairo-surface-observer.c b/src/cairo-surface-observer.c
index 22909e1..ebb38b9 100644
--- a/src/cairo-surface-observer.c
+++ b/src/cairo-surface-observer.c
@@ -1774,7 +1774,7 @@ replay_record (cairo_observation_t *log,
     cairo_surface_t *surface;
     cairo_int_status_t status;
 
-    if (log->record == NULL)
+    if (log->record == NULL || script == NULL)
 	return FALSE;
 
     surface = cairo_script_surface_create (script,
@@ -1814,7 +1814,7 @@ _cairo_observation_print (cairo_output_stream_t *stream,
     cairo_device_t *script;
     cairo_time_t total;
 
-#if CAIRO_HAS_SCRIPT_SURFAC
+#if CAIRO_HAS_SCRIPT_SURFACE
     script = _cairo_script_context_create_internal (stream);
     _cairo_script_context_attach_snapshots (script, FALSE);
 #else


More information about the cairo-commit mailing list