texture->start_time = time((time_t *)0);
}
-static void
+static Bool
setup_file_texture (ModeInfo *mi, char *filename, texture *texture)
{
Display *dpy = mi->dpy;
Colormap cmap = mi->xgwa.colormap;
XImage *image = xpm_file_to_ximage (dpy, visual, cmap, filename);
+ if (!image) return False;
#ifdef DEBUG
printf("FileTexture\n");
texture->min_ty = 0.0;
texture->max_ty = 1.0;
texture->start_time = time((time_t *)0);
+ return True;
}
static void
gleidestruct *gp = &gleidescope[MI_SCREEN(mi)];
if (!image || !*image || !strcmp(image, "DEFAULT")) {
+ BUILTIN:
/* no image specified - use system settings */
#ifdef DEBUG
printf("SetupTexture: get_snapshot\n");
#ifdef DEBUG
printf("SetupTexture: file_texture\n");
#endif
- setup_file_texture(mi, image, texture);
+ if (! setup_file_texture(mi, image, texture))
+ goto BUILTIN;
}
}
/* copy start time from texture */