[PATCH 3/3] comctl32/tooltips: Remove redundant condition.

Nikolay Sivov nsivov at codeweavers.com
Tue May 21 05:15:56 CDT 2019


Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
 dlls/comctl32/tooltips.c | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c
index 4b2298bf40..ce2bb8ba24 100644
--- a/dlls/comctl32/tooltips.c
+++ b/dlls/comctl32/tooltips.c
@@ -1838,19 +1838,16 @@ TOOLTIPS_Destroy (TOOLTIPS_INFO *infoPtr)
     TTTOOL_INFO *toolPtr;
     UINT i;
 
-    /* free tools */
-    if (infoPtr->tools) {
-        for (i = 0; i < infoPtr->uNumTools; i++)
-        {
-            toolPtr = &infoPtr->tools[i];
-
-            TOOLTIPS_FreeToolText (toolPtr);
-            TOOLTIPS_ResetSubclass (toolPtr);
-        }
+    for (i = 0; i < infoPtr->uNumTools; i++)
+    {
+        toolPtr = &infoPtr->tools[i];
 
-	Free (infoPtr->tools);
+        TOOLTIPS_FreeToolText (toolPtr);
+        TOOLTIPS_ResetSubclass (toolPtr);
     }
 
+    Free (infoPtr->tools);
+
     /* free title string */
     Free (infoPtr->pszTitle);
     /* free title icon if not a standard one */
-- 
2.20.1




More information about the wine-devel mailing list