wIconChangeImageFile get image block swapped
commitcc01ca5c6bb388d759138e6ba207570134566885
authorRodolfo García Peñas (kix) <kix@kix.es>
Sat, 28 Sep 2013 13:33:52 +0000 (28 15:33 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Tue, 1 Oct 2013 06:40:05 +0000 (1 08:40 +0200)
tree1fce5eeeb450d515aaf19f0e0ab425e3cc9a0d73
parent3250144b945bb391270679b4b2e99e66c19c6dbf
wIconChangeImageFile get image block swapped

This patch swaps the if and the else blocks for the
image value. Now, if the image doesn't exist, and because
error is always "0" (is not changed after the definition),
we can exist from the wIconChangeImageFile function.

Before this patch, if the image was NULL, the error variable
was set to "1", so we must return !error, then return "0".

Because the "path" variable is not NULL, we must wfree it.

Now, the "Set the new image" block is moved out the if block.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
src/icon.c