check for valid queue before accessing cuMask()
check for valid queue before accessing cuMask()

Change-Id: I8d4b0dbcd097c2ec5c31dea5a3d0060f0864a7e8

ROCm-Developer-Tools/ROCclr,ROCm-Developer-Tools/ROCclr