fixup potential null dereference in server code

If a client submitted a bad message it would cause the server to
crash.

Issue found by coverity.
fixup windows compilation
Merge branch 'fixup_server_null_deref'