[mutter] onscreen/native: Fix cast from CoglOnscreenEgl
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] onscreen/native: Fix cast from CoglOnscreenEgl
- Date: Mon, 8 Mar 2021 15:26:47 +0000 (UTC)
commit b962822f26452496c172e837e9c4d1d4d837f462
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Mon Mar 8 11:07:58 2021 +0100
onscreen/native: Fix cast from CoglOnscreenEgl
It used the defunct platform pointer, meaning if this path would have
hit, it'd end up with a segmentation fault due to the platform pointer
being NULL.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1759>
src/backends/native/meta-onscreen-native.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c
index d35fefb16c..4290eeeca8 100644
--- a/src/backends/native/meta-onscreen-native.c
+++ b/src/backends/native/meta-onscreen-native.c
@@ -2032,8 +2032,7 @@ destroy_egl_surface (CoglOnscreen *onscreen)
egl_surface = cogl_onscreen_egl_get_egl_surface (onscreen_egl);
if (cogl_onscreen_egl_get_egl_surface (onscreen_egl) != EGL_NO_SURFACE)
{
- MetaOnscreenNative *onscreen_native =
- cogl_onscreen_egl_get_platform (onscreen_egl);
+ MetaOnscreenNative *onscreen_native = META_ONSCREEN_NATIVE (onscreen);
MetaEgl *egl = meta_onscreen_native_get_egl (onscreen_native);
CoglFramebuffer *framebuffer = COGL_FRAMEBUFFER (onscreen);
CoglContext *cogl_context = cogl_framebuffer_get_context (framebuffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]