Changeset 31

Show
Ignore:
Timestamp:
04-05-12 10:16:32 (2 years ago)
Author:
freek.de.bruijn@…
Message:

Check whether option 1 or 2 are given before using them in CLI constructor.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cli.hpp

    r29 r31  
    3939        opt.processCommandArgs(argc, argv); 
    4040 
    41         if (strcmp(opt.getValue('1'),"true")) ms1profile = true; 
    42         if (strcmp(opt.getValue('2'),"true")) ms2profile = true; 
    43  
     41        if ((opt.getValue('1') != NULL) && strcmp(opt.getValue('1'), "true")) ms1profile = true; 
     42        if ((opt.getValue('2') != NULL) && strcmp(opt.getValue('2'), "true")) ms2profile = true; 
    4443    } 
    4544