Subject: Re: bug#40845: SVG rendering issues

From: Alan Third <[email-masked]>
Date: Sun, 23 Aug 2020 18:08:17 +0200 (CEST)

On Sun, Aug 23, 2020 at 05:43:24PM +0200, Lars Ingebrigtsen wrote:
> Alan Third <[email-masked]> writes:
> 
> > Thanks. I've pushed it to master.
> 
> Great!
> 
> I'm getting this warning, though:
> 
> image.c: In function ‘lookup_image’:
> image.c:2340:17: warning: potential null pointer dereference [-Wnull-dereference]
>  2340 |   unsigned long background = FACE_COLOR_TO_PIXEL (face->background, f);
>       |                 ^~~~~~~~~~
> image.c:2339:17: warning: potential null pointer dereference [-Wnull-dereference]
>  2339 |   unsigned long foreground = FACE_COLOR_TO_PIXEL (face->foreground, f);
>       |                 ^~~~~~~~~~
> 
> This is on Debian/bullseye, with gcc (Debian 9.3.0-15) 9.3.0.

I don't think I should have used FACE_FROM_ID_OR_NULL. I would hope
we're not going to be trying to load images without a default face
already defined.

I've pushed a fix.
-- 
Alan Third