diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-15 21:03:52 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-15 21:03:52 +0000 |
commit | 4e88e7dcc704d89583620af6af2738d49db9e5aa (patch) | |
tree | 591d3528dd00a8d70bccbe69e9353c44a939fd6c /src/sna/sna_dri2.c | |
parent | 3cc011ae11be6437241c3411bce1935ec0b187f5 (diff) |
sna/dri2: Rearrange "impossible" paths to avoid an assert
Ensure that we don't try and double-free the decoupled vblank event by
checking whether it is still pending first.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri2.c')
-rw-r--r-- | src/sna/sna_dri2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 2ed698d9..c3346434 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -2484,14 +2484,14 @@ static void chain_swap(struct sna_dri2_event *chain) DBG(("%s: draw=%ld, queued?=%d, type=%d\n", __FUNCTION__, (long)chain->draw->id, chain->queued, chain->type)); + if (chain->queued) /* too early! */ + return; + if (chain->draw == NULL) { sna_dri2_event_free(chain); return; } - if (chain->queued) /* too early! */ - return; - assert(chain == dri2_chain(chain->draw)); assert(chain->signal); |