Changeset 1199 for toilet/trunk


Ignore:
Timestamp:
Oct 13, 2006, 3:11:20 PM (13 years ago)
Author:
Sam Hocevar
Message:
  • Fix a crash when font opening fails.
File:
1 edited

Legend:

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

    r1197 r1199  
    4949    cucul_buffer_t *buffer;
    5050
    51     int i, j;
     51    int i, j, ret;
    5252
    5353    unsigned int flag_gay = 0;
     
    171171
    172172    if(!strcasecmp(cx->font, "mono9"))
    173         init_big(cx);
     173        ret = init_big(cx);
    174174    else if(!strcasecmp(cx->font, "term"))
    175         init_tiny(cx);
     175        ret = init_tiny(cx);
    176176    else
    177         init_figlet(cx);
     177        ret = init_figlet(cx);
     178
     179    if(ret)
     180        return -1;
    178181
    179182    if(optind >= argc)
Note: See TracChangeset for help on using the changeset viewer.