The assert check for c->bo should be done before DBG, else it will hit memory access violation when c->bo is null. Signed-off-by: Lim Siew Hoon <siew.hoon.lim@xxxxxxxxx> Reviewed-by: Matt Roper <matthew.d.roper@xxxxxxxxx> Signed-off-by: Matt Roper <matthew.d.roper@xxxxxxxxx> --- src/sna/sna_dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 766ce6d..982bc89 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -278,9 +278,9 @@ sna_dri2_get_back(struct sna *sna, bo = NULL; list_for_each_entry(c, &priv->cache, link) { + assert(c->bo); DBG(("%s: cache: handle=%d, active=%d\n", __FUNCTION__, c->bo ? c->bo->handle : 0, c->bo ? c->bo->active_scanout : -1)); - assert(c->bo); if (c->bo->active_scanout == 0) { bo = c->bo; name = c->name; -- 2.1.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx