Ignore:
Timestamp:
Feb 22, 2007, 4:31:39 PM (13 years ago)
Author:
Jean-Yves Lamoureux
Message:
  • Added error checks on canvas / display creations
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/test/swallow.c

    r1462 r1753  
    4343    app = cucul_create_canvas(0, 0);
    4444    dp = caca_create_display(cv);
    45     if(!dp)
    46         return 1;
     45
     46    if(cv == NULL || app == NULL )
     47    {
     48        printf("Can't created canvas\n");
     49        return -1;
     50    }
     51    if(dp == NULL)
     52    {
     53        printf("Can't create display\n");
     54        return -1;
     55    }
    4756
    4857    w = (cucul_get_canvas_width(cv) - 4) / 2;
Note: See TracChangeset for help on using the changeset viewer.