mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 22:40:09 +01:00
gallium/osmesa: add same checks to OSMesaMakeCurrent as the other osmesa
Fixes a opengl crash in wine. Cc: "9.2" <mesa-stable@lists.freedesktop.org> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
This commit is contained in:
parent
603160d4c0
commit
86751cbddf
1 changed files with 3 additions and 2 deletions
|
|
@ -616,10 +616,11 @@ OSMesaMakeCurrent(OSMesaContext osmesa, void *buffer, GLenum type,
|
|||
struct osmesa_buffer *osbuffer;
|
||||
enum pipe_format color_format;
|
||||
|
||||
if (osmesa->format == OSMESA_RGB_565 && type != GL_UNSIGNED_SHORT_5_6_5) {
|
||||
if (!osmesa || !buffer || width < 1 || height < 1) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
if (width < 1 || height < 1) {
|
||||
|
||||
if (osmesa->format == OSMESA_RGB_565 && type != GL_UNSIGNED_SHORT_5_6_5) {
|
||||
return GL_FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue