mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-05 07:16:12 -04:00
render/pixman: null check on newly created image
This commit is contained in:
parent
f36f856cdb
commit
70add22e74
1 changed files with 1 additions and 1 deletions
|
|
@ -43,7 +43,7 @@ bool begin_pixman_data_ptr_access(struct wlr_buffer *wlr_buffer, pixman_image_t
|
||||||
|
|
||||||
pixman_image_t *new_image = pixman_image_create_bits_no_clear(format,
|
pixman_image_t *new_image = pixman_image_create_bits_no_clear(format,
|
||||||
wlr_buffer->width, wlr_buffer->height, data, stride);
|
wlr_buffer->width, wlr_buffer->height, data, stride);
|
||||||
if (image == NULL) {
|
if (new_image == NULL) {
|
||||||
wlr_buffer_end_data_ptr_access(wlr_buffer);
|
wlr_buffer_end_data_ptr_access(wlr_buffer);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue