[util] Fix ansi output when surface is empty

This commit is contained in:
Behdad Esfahbod 2014-09-25 17:59:46 +03:00
parent 156852991e
commit 80f7728226
1 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ helper_cairo_surface_write_to_ansi_stream (cairo_surface_t *surface,
* Find the tight image top/bottom and only print in between. */ * Find the tight image top/bottom and only print in between. */
/* Use corner color as background color. */ /* Use corner color as background color. */
uint32_t bg_color = * (uint32_t *) data; uint32_t bg_color = data ? * (uint32_t *) data : 0;
/* Drop first row while empty */ /* Drop first row while empty */
while (height) while (height)