wmaker: add check for null pointer in wAppIconCreateForDock (Coverity #50053)
As pointed by Coverity, there is in the same procedure a check for null
pointer before use, and later a direct use without check.
In most case, the pointer is not null, but it one case it is hard to be
sure that the pointer cannot be null, so it's safer to just add a check
there also.
Took opportunity to swap the order of the arguments in the if, because if
the config flag is false it is not necessary to spend time on doing the
more expensive strcmp.
Signed-off-by: Christophe CURIS <christophe.curis@free.fr>