[qtwayland] Avoid crashing race condition.