From 82d04a4e63253cf7d3575d9876d318401e0993c0 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 27 Oct 2019 23:51:11 +0100 Subject: [PATCH] bcm: fix software cursor avoidance for loadimage() case (thanks bitmapper) --- sys/src/9/bcm/screen.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/src/9/bcm/screen.c b/sys/src/9/bcm/screen.c index c1fa8a7f4..7aa57f9e6 100644 --- a/sys/src/9/bcm/screen.c +++ b/sys/src/9/bcm/screen.c @@ -88,18 +88,18 @@ hwdraw(Memdrawparam *par) { Memimage *dst, *src, *mask; - if((dst=par->dst) == nil || dst->data == nil) - return 0; - if((src=par->src) == nil || src->data == nil) - return 0; - if((mask=par->mask) == nil || mask->data == nil) + if((dst = par->dst) == nil || dst->data == nil) return 0; + if((src = par->src) && src->data == nil) + src = nil; + if((mask = par->mask) && mask->data == nil) + mask = nil; if(dst->data->bdata == xgdata.bdata) swcursoravoid(par->r); - if(src->data->bdata == xgdata.bdata) + if(src && src->data->bdata == xgdata.bdata) swcursoravoid(par->sr); - if(mask->data->bdata == xgdata.bdata) + if(mask && mask->data->bdata == xgdata.bdata) swcursoravoid(par->mr); return 0;