• Olivier Fourdan's avatar
    glamor: glamor_set_destination_drawable() can fail · 04b4bad7
    Olivier Fourdan authored
    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
    Bugzilla: https://bugzilla.redhat.com/1417575Signed-off-by: default avatarOlivier Fourdan <ofourdan@redhat.com>
glamor_transform.h 3.74 KB