wmaker: fix memory leak in the Workspace Map if there is no workspace (Coverity #109608)
As pointed by Coverity, there is a safety check on the number of workspace
which aborts the function, but the storage memory have already been
allocated so it would leak this buffer.
The case where the number of workspace is 0 is probably not supposed to
happen (there should always be at least 1 workspace, the current one), but
it is better to keep safety checks, so this patch is moving the check at
the beginning so no leak will occur.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>