slock

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 263310fe63eed7fc536c100ea42626edce33a946
parent 934febedfa35ed19de89ce71f931bead030f5e89
Author: bakkeby <bakkeby@gmail.com>
Date:   Wed,  3 Sep 2025 21:36:44 +0200

background iamge: bail early if the image could not be loaded from path

Diffstat:
Mpatch/background_image.c | 6++++++
1 file changed, 6 insertions(+), 0 deletions(-)

diff --git a/patch/background_image.c b/patch/background_image.c @@ -21,6 +21,12 @@ create_lock_image(Display *dpy) { /* Load picture */ Imlib_Image buffer = imlib_load_image(background_image); + + if (!buffer) { + fprintf(stderr, "Failed to load background image: %s\n", background_image); + return; + } + imlib_context_set_image(buffer); int background_image_width = imlib_image_get_width(); int background_image_height = imlib_image_get_height();