mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 11:32:04 +00:00
cogl/renderer: Set error in dmabuf constructor fallback
When the CoglRenderer didn't set the DMA buffer constructor vfunc, we return NULL. What we didn't do was set the error, meaning the caller would crash if it tried to look up why DMA buffer construction failed. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1430
This commit is contained in:
parent
d338e5eed1
commit
7d822459de
@ -31,6 +31,7 @@
|
||||
|
||||
#include "cogl-config.h"
|
||||
|
||||
#include <gio/gio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@ -768,5 +769,8 @@ cogl_renderer_create_dma_buf (CoglRenderer *renderer,
|
||||
if (winsys->renderer_create_dma_buf)
|
||||
return winsys->renderer_create_dma_buf (renderer, width, height, error);
|
||||
|
||||
g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
|
||||
"CoglRenderer doesn't support creating DMA buffers");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user