qstat - Fix for possible NULL pointer