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/import.c

    r1462 r1753  
    4242
    4343    cv = cucul_create_canvas(0, 0);
     44    if(cv == NULL)
     45    {
     46        printf("Can't create canvas\n");
     47        return -1;
     48    }
     49
    4450    if(cucul_import_file(cv, argv[1], argc >= 3 ? argv[2] : "") < 0)
    4551    {
     
    5056
    5157    dp = caca_create_display(cv);
     58    if(dp == NULL)
     59    {
     60        printf("Can't create display\n");
     61        return -1;
     62    }
    5263
    5364    caca_refresh_display(dp);
Note: See TracChangeset for help on using the changeset viewer.