From e8e81278322b4af68fbcb06490a6fa771f5b8f4b Mon Sep 17 00:00:00 2001 From: Michael Jennings Date: Tue, 2 Nov 1999 16:08:57 +0000 Subject: Tue Nov 2 16:53:56 PST 1999 Michael Jennings Several bugs fixed here, most notably a potential seg fault in Esetroot, and remembering an Eterm's size works again. Also a minor redraw speedup. And %exec() now works properly instead of just causing Eterm to crash. :-) SVN revision: 1153 --- utils/Esetroot.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'utils') diff --git a/utils/Esetroot.c b/utils/Esetroot.c index 87f8e17..f51cb29 100644 --- a/utils/Esetroot.c +++ b/utils/Esetroot.c @@ -169,9 +169,17 @@ main(int argc, char *argv[]) params.flags = PARAMS_VISUALID; params.visualid = (DefaultVisual(Xdisplay, screen))->visualid; id = Imlib_init_with_params(Xdisplay, ¶ms); - im = Imlib_load_image(id, fname); - if (debug) { + if (id == NULL) { + fprintf(stderr, "%s: Unable to initialize Imlib.\n", *argv); + exit(1); + } else if (debug) { fprintf(stderr, "%s:%d: The Imlib Data is at %8p\n", __FILE__, __LINE__, id); + } + im = Imlib_load_image(id, fname); + if (im == NULL) { + fprintf(stderr, "%s: Unable to load image file \"%s\".\n", *argv, fname); + exit(1); + } else if (debug) { fprintf(stderr, "%s:%d: The Imlib Image is at %8p\n", __FILE__, __LINE__, im); } if (scale) { -- cgit v1.2.1