mirror of
https://github.com/brl/mutter.git
synced 2025-01-13 05:02:14 +00:00
renderer-native: Don't crash if the FB surface can't be locked
(cherry picked from commit 0332b7394e
)
This commit is contained in:
parent
e73b321c2e
commit
a41d84db00
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user