winefile: Fix collapsing when there's no parent directory (try 2)

André Hentschel nerv at dawncrow.de
Tue Feb 14 12:33:54 CST 2012


Fixes a crash when you are at / (unix fs) and double click ..
try2: only formatting changes

---
 programs/winefile/winefile.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/programs/winefile/winefile.c b/programs/winefile/winefile.c
index 63ce463..52e1bc4 100644
--- a/programs/winefile/winefile.c
+++ b/programs/winefile/winefile.c
@@ -3563,7 +3563,10 @@ static BOOL expand_entry(ChildWnd* child, Entry* dir)
 
 static void collapse_entry(Pane* pane, Entry* dir)
 {
-	int idx = SendMessageW(pane->hwnd, LB_FINDSTRING, 0, (LPARAM)dir);
+        int idx;
+
+        if (!dir) return;
+        idx = SendMessageW(pane->hwnd, LB_FINDSTRING, 0, (LPARAM)dir);
 
 	ShowWindow(pane->hwnd, SW_HIDE);
 
-- 

Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120214/24b7bba5/attachment.ksh>


More information about the wine-patches mailing list