From 9c5306a96b689f9fc971e32a462b77584d083450 Mon Sep 17 00:00:00 2001 From: Daniel van Vugt Date: Wed, 28 Jul 2021 16:35:56 +0800 Subject: [PATCH] onscreen/native: Replace an assertion that double buffering is the maximum Because it soon won't be the maximum. But we do want to verify that the frame info queue is not empty, to avoid NULL dereferencing and catch logic errors. (cherry picked from commit 2076f6e3a91438bf883354888f019931f63dad00) Part-of: Signed-off-by: Mingi Sung --- src/backends/native/meta-onscreen-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/native/meta-onscreen-native.c b/src/backends/native/meta-onscreen-native.c index 6bccaed19..450abec7d 100644 --- a/src/backends/native/meta-onscreen-native.c +++ b/src/backends/native/meta-onscreen-native.c @@ -201,7 +201,7 @@ meta_onscreen_native_notify_frame_complete (CoglOnscreen *onscreen) info = cogl_onscreen_pop_head_frame_info (onscreen); - g_assert (!cogl_onscreen_peek_head_frame_info (onscreen)); + g_return_if_fail (info); _cogl_onscreen_notify_frame_sync (onscreen, info); _cogl_onscreen_notify_complete (onscreen, info);