From b6820aa84730a5a45ea42051f1e1d0ab923c3d28 Mon Sep 17 00:00:00 2001
From: Bart Massey <bart@cs.pdx.edu>
Date: Wed, 5 Jan 2011 21:20:11 -0800
Subject: [PATCH 2/3] moved aborting test in surface.c to avoid bogus exception

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

diff --git a/src/surface.c b/src/surface.c
index 2584874..2bc3420 100644
--- a/src/surface.c
+++ b/src/surface.c
@@ -451,6 +451,8 @@ do_Cairo_Image_get_pixel (Value sv, Value xv, Value yv)
     unsigned char    	*data;
     uint32_t		pixel;

+    if (aborting)
+	RETURN (Void);
     if (c5s->kind != CAIRO_5C_IMAGE)
 	RaiseStandardException (exception_invalid_argument, 3,
 				NewStrString ("not an image surface_t"),
@@ -465,8 +467,6 @@ do_Cairo_Image_get_pixel (Value sv, Value xv, Value yv)
 	RaiseStandardException (exception_invalid_argument, 3,
 				NewStrString ("y out of range"),
 				NewInt(2), yv);
-    if (aborting)
-	RETURN (Void);

     data = (cairo_image_surface_get_data (c5s->surface) +
 	    y * cairo_image_surface_get_stride (c5s->surface));
-- 
1.7.2.3

