Fixed a logic error

Traceback:
1: 50: Assuming arg == NULL
2: 54: Calling PROGA_NextArg()
3: 58: Dereference of null pointer