rem: screen.curr_index = (long int)data;
add: long idx = (long)data;  if (screen.file[idx] == NULL) return;  screen.curr_index = idx;
context: cb_layer_button(GtkWidget *widget, gpointer data){        screen.curr_index = (long int)data;    /* Redraw the image(s) */    redraw_pixmap(screen.drawing_area, TRUE);} /* cb_layer_button */