Changeset 2419 for toilet


Ignore:
Timestamp:
Jun 15, 2008, 4:59:25 PM (11 years ago)
Author:
Sam Hocevar
Message:
  • Re-add the cx->torender trick to avoid crashing on filters. This really needs some architecture thinking.
Location:
toilet/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • toilet/trunk/src/figlet.c

    r2414 r2419  
    6060static int flush_figlet(context_t *cx)
    6161{
    62     return cucul_flush_figlet(cx->cv);
     62    int ret = cucul_flush_figlet(cx->cv);
     63    cx->torender = cx->cv;
     64    cx->cv = cucul_create_canvas(0, 0);
     65    return ret;
    6366}
    6467
  • toilet/trunk/src/render.c

    r2414 r2419  
    157157
    158158    /* Output line */
    159     buffer = cucul_export_memory(cx->cv, cx->export, &len);
     159    buffer = cucul_export_memory(cx->torender, cx->export, &len);
    160160    if(!buffer)
    161161        return -1;
    162162    fwrite(buffer, len, 1, stdout);
    163163    free(buffer);
     164    cucul_free_canvas(cx->torender);
    164165
    165166    return 0;
Note: See TracChangeset for help on using the changeset viewer.