shell32: Do nothing if we can't convert PIDL to path in SHAddToRecentDocs.

Vincent Povirk madewokherd at gmail.com
Mon Sep 14 15:18:43 CDT 2015


This is based on a patch that was committed to CrossOver by Aric Stewart.
-------------- next part --------------
From 592b298ab64702c2afb5d26e61a25617193a3682 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Mon, 14 Sep 2015 15:08:36 -0500
Subject: [PATCH] shell32: Do nothing if we can't convert PIDL to path in
 SHAddToRecentDocs.

---
 dlls/shell32/shellord.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c
index 914dc5a..1b97f57 100644
--- a/dlls/shell32/shellord.c
+++ b/dlls/shell32/shellord.c
@@ -876,7 +876,11 @@ void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv)
     switch (uFlags)
     {
     case SHARD_PIDL:
-        SHGetPathFromIDListA(pv, doc_name);
+        if (!SHGetPathFromIDListA(pv, doc_name))
+        {
+            ERR("can't get path from PIDL\n");
+            return;
+        }
         break;
 
     case SHARD_PATHA:
-- 
2.1.4



More information about the wine-patches mailing list