Fixed crash on toggling fullscreen on empty ws

By checking if the client on the ws is null
or not. Also removed the annoying braces
on a single line if condition.