Skip to content
Commit 703ba42c authored by Olivier Fourdan's avatar Olivier Fourdan
Browse files

glamor: glamor_set_destination_drawable() can fail

The fbo_array of a given glamor pixmap can be NULL in some cases, as
glamor_create_fbo_array() can fail to allocate the FBO array.

If this is the case, glamor_pixmap_fbo_at() will return NULL even though
the box index is valid, and glamor_set_destination_drawable() simply
assumes glamor_pixmap_fbo_at() will return an FBO prior to pass the
value to glamor_set_destination_pixmap_fbo(), which will segfault.

We need a way for glamor_set_destination_drawable() to fail safely and
let the caller know about the failure.

Add a boolean return value to glamor_set_destination_drawable() for that
purpose.

Bugzilla: https://bugzilla.redhat.com/1417575


Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
(cherry picked from commit 04b4bad7)
parent 52ab10aa
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment