commit 9f7d7fcd8bef8908e012a8a06d9e24ab7f45dbd4
parent 160ebbfc6d88d5c1315b3672c4424a967d3e79c1
Author: Michael Forney <mforney@mforney.org>
Date: Mon, 6 Feb 2017 11:48:21 -0800
pointer: Blank the cursor if wld_import_buffer failed
Diffstat:
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/libswc/pointer.c b/libswc/pointer.c
@@ -145,12 +145,8 @@ pointer_set_cursor(struct pointer *pointer, uint32_t id)
buffer = wld_import_buffer(swc.shm->context, WLD_OBJECT_DATA, object,
cursor->width, cursor->height, WLD_FORMAT_ARGB8888, cursor->width * 4);
-
- if (!buffer) {
- ERROR("Failed to create cursor buffer\n");
- return;
- }
-
+ if (!buffer)
+ WARNING("Failed to create cursor buffer\n");
pointer->cursor.internal_buffer = buffer;
pointer->cursor.hotspot.x = cursor->hotspot_x;
pointer->cursor.hotspot.y = cursor->hotspot_y;