Check if qObj is NULL before calling Q_LOCK(&qObj->qMutex)