From: Christophe CURIS <christophe.cu...@free.fr>

As pointed by Coverity, the function handles the case where the file to be
copied is not found by properly warning the user and the deleting the
currently built theme directory, but then it continued executing the file
copy that would crash on the null pointer.

This patch just adds the missing return that will avoid the crash.

Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>
---
 util/getstyle.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/util/getstyle.c b/util/getstyle.c
index c39d266..2b7edb9 100644
--- a/util/getstyle.c
+++ b/util/getstyle.c
@@ -172,6 +172,7 @@ static void findCopyFile(const char *dir, const char *file)
                wwarning("Could not find file %s", file);
                if (ThemePath)
                        (void)wrmdirhier(ThemePath);
+               return;
        }
        wcopy_file(dir, fullPath, fullPath);
        free(fullPath);
-- 
2.1.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to