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

Legend:

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

    r1462 r1753  
    2929    int i, j;
    3030
    31     cv = cucul_create_canvas(0, 0);
    32     if(!cv)
     31    cv = cucul_create_canvas(32, 16);
     32    if(cv == NULL)
     33    {
     34        printf("Failed to create canvas\n");
    3335        return 1;
     36    }
    3437
    3538    dp = caca_create_display(cv);
    36     if(!dp)
     39    if(dp == NULL)
     40    {
     41        printf("Failed to create display\n");
    3742        return 1;
     43    }
    3844
    3945    cucul_set_color_ansi(cv, CUCUL_LIGHTGRAY, CUCUL_BLACK);
Note: See TracChangeset for help on using the changeset viewer.