IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 6107


Ignore:
Timestamp:
Jan 20, 2006, 5:09:49 PM (21 years ago)
Author:
jhoblitt
Message:

don't segfault when an option isn't specified

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/chiptoolConfig.c

    r6103 r6107  
    7373    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-filter",  0, "define filter of interest", "");
    7474
     75    if (config->mode == P2_MODE_NONE) {
     76        fprintf (stderr, "search mode not specified\n");
     77        psArgumentHelp(config->arguments);
     78        psFree(config->arguments);
     79        exit(EXIT_FAILURE);
     80    }
     81
    7582    if (! psArgumentParse(config->arguments, &argc, argv) || argc != 1) {
    7683        printf("\nPan-STARRS Phase 2 Search Tool\n\n");
     
    8390
    8491    // add the input and output images to the arguments list
    85     psMetadataAddStr (config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[1]);
     92    //psMetadataAddStr (config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[1]);
    8693
    8794    // define Database handle, if used
Note: See TracChangeset for help on using the changeset viewer.