[mutter] renderer-native: Don't crash if the FB surface can't be locked
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] renderer-native: Don't crash if the FB surface can't be locked
- Date: Tue, 29 May 2018 22:14:45 +0000 (UTC)
commit 0332b7394e56f71c15692663ab05f8c84a4b9eff
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Tue May 8 22:36:33 2018 +0100
renderer-native: Don't crash if the FB surface can't be locked
src/backends/native/meta-renderer-native.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 2571cac25..cb8e03abe 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -1601,6 +1601,12 @@ gbm_get_next_fb_id (MetaGpuKms *gpu_kms,
/* Now we need to set the CRTC to whatever is the front buffer */
next_bo = gbm_surface_lock_front_buffer (gbm_surface);
+ if (!next_bo)
+ {
+ g_error ("Impossible to lock surface front buffer: %m");
+ return FALSE;
+ }
+
for (i = 0; i < gbm_bo_get_plane_count (next_bo); i++)
{
strides[i] = gbm_bo_get_stride_for_plane (next_bo, i);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]