From b962822f26452496c172e837e9c4d1d4d837f462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 8 Mar 2021 11:07:58 +0100 Subject: [PATCH] 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: --- 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 d35fefb16..4290eeeca 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);