diff options
author | Marek Olšák <[email protected]> | 2010-07-31 02:19:27 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2010-08-04 00:07:28 +0200 |
commit | afbf446de5ad91743e2e2a76799bd87f3eed5f9a (patch) | |
tree | 37db8f5933c3d93b4f6a36ba3c9275de73beb3db /src | |
parent | 0614006d090902324149387ec150231b647928fd (diff) |
st/dri: fix crash when dri2_drawable_get_buffers fails
It's easily reproducible with Compiz with its Resize window mode
set to Normal (which is usually not the default mode).
https://bugs.freedesktop.org/show_bug.cgi?id=28658
https://bugs.freedesktop.org/show_bug.cgi?id=29303
This is actually a workaround to prevent Compiz crashes.
Instead, a completely white titlebar might show up during resizing
transparent windows (a rare case).
The underlying cause should be fixed by someone who has more knowledge
about the code. (dri2_drawable_get_buffers should not return NULL)
Acked-By: Jakob Bornecrantz <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/dri/drm/dri2.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/dri/drm/dri2.c b/src/gallium/state_trackers/dri/drm/dri2.c index 88ffa1e89d3..1fb89963371 100644 --- a/src/gallium/state_trackers/dri/drm/dri2.c +++ b/src/gallium/state_trackers/dri/drm/dri2.c @@ -351,7 +351,8 @@ dri2_allocate_textures(struct dri_drawable *drawable, unsigned num_buffers = count; buffers = dri2_drawable_get_buffers(drawable, statts, &num_buffers); - dri2_drawable_process_buffers(drawable, buffers, num_buffers); + if (buffers) + dri2_drawable_process_buffers(drawable, buffers, num_buffers); } static void |