Update palette of taxi sequence example
[colorize.git] / gui / colorize.c
index 5a8f545..31d01e6 100644 (file)
@@ -295,7 +295,9 @@ void colorize_image(void)
        darrayDestroy(I);
        I = NULL;
 
-       darrayDone();
+       /* during real time rendering, we cannot check if all arrays are free */
+       if (thread_preview == PREVIEW_OFF)
+               darrayDone();
 
        /* create window */
        colorize_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
@@ -349,22 +351,13 @@ error:
        darrayDestroy(mI);
        darrayDestroy(I);
 
-       darrayDone();
+       /* during real time rendering, we cannot check if all arrays are free */
+       if (thread_preview == PREVIEW_OFF)
+               darrayDone();
 }
 
 /* real time thread */
 
-enum thread_preview {
-       PREVIEW_OFF,
-       PREVIEW_NEW,
-       PREVIEW_ALLOC,
-       PREVIEW_ON,
-};
-
-static int thread_debug = 0;
-static int thread_running = 0;
-static enum thread_preview thread_preview = PREVIEW_OFF;
-
 static void *colorize_thread(void *arg)
 {
        struct colorize *col = NULL;