ref: 82d04a4e63253cf7d3575d9876d318401e0993c0
parent: ff44b92c9641ffae799a5e12f88eb42294f24f2f
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Oct 27 19:51:11 EDT 2019
bcm: fix software cursor avoidance for loadimage() case (thanks bitmapper)
--- a/sys/src/9/bcm/screen.c
+++ b/sys/src/9/bcm/screen.c
@@ -88,18 +88,18 @@
{
Memimage *dst, *src, *mask;
- if((dst=par->dst) == nil || dst->data == nil)
+ 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)
- 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;