MDVI marks empty glyphs by setting its data pointer to 0x1
(MDVI_GLYPH_EMPTY constant) but it doesn't check for the
emptiness sometimes. Fixes bug #600552.
glyph = &ch->grey;
- isbox = (glyph->data == NULL || (dvi->params.flags & MDVI_PARAM_CHARBOXES));
+ isbox = (glyph->data == NULL ||
+ (dvi->params.flags & MDVI_PARAM_CHARBOXES) ||
+ MDVI_GLYPH_ISEMPTY (glyph->data));
x = - glyph->x + x0 + cairo_device->xmargin;
y = - glyph->y + y0 + cairo_device->ymargin;
return ch;
} else if(MDVI_ENABLED(dvi, MDVI_PARAM_ANTIALIASED)) {
if(ch->grey.data &&
+ !MDVI_GLYPH_ISEMPTY(ch->grey.data) &&
ch->fg == dvi->curr_fg &&
ch->bg == dvi->curr_bg)
return ch;
- if(ch->grey.data) {
+ if(ch->grey.data &&
+ !MDVI_GLYPH_ISEMPTY(ch->grey.data)) {
if(dvi->device.free_image)
dvi->device.free_image(ch->grey.data);
ch->grey.data = NULL;