[PATCH] comctl32/taskdialog: Remove superfluous title pointer check (Coverity)

Nikolay Sivov nsivov at codeweavers.com
Sun Apr 30 14:16:22 CDT 2017


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---

We explicitly check it earlier and use empty string in case it's NULL.

 dlls/comctl32/taskdialog.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/dlls/comctl32/taskdialog.c b/dlls/comctl32/taskdialog.c
index 6b8bcfcae6..e452d3487c 100644
--- a/dlls/comctl32/taskdialog.c
+++ b/dlls/comctl32/taskdialog.c
@@ -271,8 +271,7 @@ static DLGTEMPLATE *create_taskdialog_template(const TASKDIALOGCONFIG *taskconfi
     title_size = (strlenW(titleW) + 1) * sizeof(WCHAR);
 
     size = sizeof(DLGTEMPLATE) + 2 * sizeof(WORD);
-    if (titleW)
-        size += title_size;
+    size += title_size;
     size += 2; /* font size */
 
     list_init(&desc.controls);
-- 
2.11.0




More information about the wine-patches mailing list