added fail check
This commit is contained in:
parent
4aa0a6105c
commit
748c582e64
4
mpdart.c
4
mpdart.c
|
@ -107,6 +107,7 @@ void imlib_update(char* path) {
|
|||
|
||||
if (!im_image) {
|
||||
warn("Unable to open image");
|
||||
printf("%s\n", im_image_path);
|
||||
XClearWindow(xdisplay, xwindow);
|
||||
return;
|
||||
}
|
||||
|
@ -122,6 +123,9 @@ void imlib_update(char* path) {
|
|||
|
||||
void imlib_render(int up_w, int up_h) {
|
||||
|
||||
if (!im_image || !im_image_path)
|
||||
return;
|
||||
|
||||
imlib_blend_image_onto_image(im_image, 0,
|
||||
0, 0, im_w, im_h,
|
||||
0, 0, up_w, up_h);
|
||||
|
|
Loading…
Reference in New Issue
Block a user