summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>1999-11-02 16:08:57 +0000
committerMichael Jennings <mej@kainx.org>1999-11-02 16:08:57 +0000
commite8e81278322b4af68fbcb06490a6fa771f5b8f4b (patch)
treea5de6b18eda823772a4ffc6008b545e9b459618e /utils
parentdfed60dd34a670fa63d6f9e2e61010f2f1be83c1 (diff)
downloadeterm-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.c12
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, &params);
- 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) {