[client] Fix nullptr dereference in ConfinedPointer and LockedPointer
The setRegion call allows a null region. This means nullptr is an allowed value which can be passed to ConfinedPointer::setRegion and LockedPointer::setRegion. In that case we crash if we try to convert the Region into a wl_region. Thus add proper nullptr check, just like in PointerConstraints::lockPointer and ::confinePointer. Auto test adjusted to cover the condition.
Showing with 20 additions and 2 deletions