wmaker: add check for null pointer in wAppIconCreateForDock (Coverity #50053)
commit1b00071c266a7beba53be7b7f2e8c808e5bdb8a8
authorChristophe CURIS <christophe.curis@free.fr>
Sat, 29 Nov 2014 15:35:19 +0000 (29 16:35 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sat, 29 Nov 2014 18:44:47 +0000 (29 18:44 +0000)
tree18bdcd27098d271624af648906efb0d407a98ae7
parent63733c913316861582f2330c13741ef3862d4d87
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>
src/appicon.c