src/lib/image.c
changeset 64 98d934a9b3db
parent 56 d5e3089906da
child 69 1d188aa94aee
--- a/src/lib/image.c	Mon Jan 25 02:04:35 2010 +0200
+++ b/src/lib/image.c	Mon Jan 25 02:09:29 2010 +0200
@@ -206,6 +206,9 @@
     return err;
 }
 
+/**
+ * Async work func for pt_image_tile_async
+ */
 static void _pt_image_tile_async (void *arg)
 {
     struct pt_tile *tile = arg;
@@ -228,6 +231,10 @@
     struct pt_tile *tile;
     int err;
 
+    // need a ctx for this
+    if (!image->ctx)
+        return -1;
+
     // alloc
     if ((err = pt_tile_new(&tile)))
         return err;