diff options
author | Michael Jennings <mej@kainx.org> | 1999-11-02 16:08:57 +0000 |
---|---|---|
committer | Michael Jennings <mej@kainx.org> | 1999-11-02 16:08:57 +0000 |
commit | e8e81278322b4af68fbcb06490a6fa771f5b8f4b (patch) | |
tree | a5de6b18eda823772a4ffc6008b545e9b459618e /utils | |
parent | dfed60dd34a670fa63d6f9e2e61010f2f1be83c1 (diff) | |
download | eterm-e8e81278322b4af68fbcb06490a6fa771f5b8f4b.tar.gz |
Tue Nov 2 16:53:56 PST 1999 Michael Jennings <mej@eterm.org>
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
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Esetroot.c | 12 |
1 files changed, 10 insertions, 2 deletions
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) { |