Skip to content

clutter/layer-paint-node: Handle failure to allocate offscreen

The failure to allocate was not properly handled, causing crashes later
on due to the offscreen being NULL.

 #0  cogl_gl_framebuffer_bind (target=36160, gl_framebuffer=0x0)
 #1  _cogl_driver_gl_flush_framebuffer_state (...)
 #2  cogl_context_flush_framebuffer_state (read_buffer=0x55f48f386780, draw_buffer=0x55f48f386780, ...)
 #3  cogl_framebuffer_clear4f (framebuffer=0x55f48f386780, ...)
 #4  clutter_layer_node_pre_draw (...)
 #5  clutter_paint_node_paint (...)

...

The first commit is unrelated; I just wasted some seconds trying to find lnode->offscreen only to find lnode was res in one single place. res (whatever that means) seems to be used for paint nodes. I can remove it, or change all res:es to be something saner or leave it as is, I just made the rename out of frustration.

Merge request reports