Changeset 2422 for neercs


Ignore:
Timestamp:
Jun 15, 2008, 5:34:48 PM (12 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Removed bad use of destroyed screens
File:
1 edited

Legend:

Unmodified
Added
Removed
  • neercs/trunk/src/screens.c

    r2421 r2422  
    9595int remove_screen(struct screen_list *list, int n, int please_kill)
    9696{
    97     if(n>list->count) return -1;
     97
     98    if(n>=list->count) return -1;
    9899
    99100    if(please_kill)
     
    119120
    120121    }
     122    destroy_screen(list->screen[n]);
    121123
    122124    memmove(&list->screen[n],
     
    130132        fprintf(stderr, "Can't allocate memory at %s:%d\n", __FUNCTION__, __LINE__);
    131133
     134
     135
    132136    list->count--;
    133137    return 1;
     
    141145{
    142146    int i;
     147
     148    if(!screen_list->count) return;
    143149
    144150    screen_list->width  = cucul_get_canvas_width(cv);
Note: See TracChangeset for help on using the changeset viewer.