Changeset 1102 for trunk/dll/treecnr.c
- Timestamp:
- Aug 2, 2008, 10:29:35 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dll/treecnr.c
r1079 r1102 46 46 15 Feb 08 SHL Sync with settings menu rework 47 47 15 Feb 08 SHL Avoid death if tree container 0 width 48 19 Jul 08 GKY Replace save_dir2(dir) with pFM2SaveDirectory 49 02 Aug 08 GKY Always pass temp variable point to UM_SHOWME to avoid freeing pci->pszFileName early 48 50 49 51 ***********************************************************************/ … … 674 676 if (cnri.cRecords) { 675 677 sprintf(s, GetPString(IDS_NUMDRIVESTEXT), cnri.cRecords); 676 if (pci ) {678 if (pci && pci->pszFileName) { 677 679 if (!(driveflags[toupper(*pci->pszFileName) - 'A'] & 678 680 DRIVE_REMOVABLE) || … … 2354 2356 case IDM_FINDINTREE: 2355 2357 { 2356 CHAR dir[CCHMAXPATH];2358 PSZ pszTempDir; 2357 2359 PCNRITEM pci; 2358 2360 2359 2361 pci = (PCNRITEM) CurrentRecord(hwnd); 2360 2362 if (pci && (INT) pci != -1) { 2361 strcpy(dir, pci->pszFileName); 2362 MakeValidDir(dir); 2363 pszTempDir = xstrdup(pci->pszFileName, pszSrcFile, __LINE__); 2364 if (pszTempDir) 2365 MakeValidDir(pszTempDir); 2363 2366 } 2364 2367 else 2365 save_dir2(dir); 2366 if (WinDlgBox(HWND_DESKTOP, dcd->hwndParent, 2367 WalkAllDlgProc, 2368 FM3ModHandle, WALK_FRAME, MPFROMP(dir)) && *dir) 2369 WinSendMsg(hwnd, UM_SHOWME, MPFROMP(dir), MPFROMLONG(1)); 2368 pszTempDir = xstrdup(pFM2SaveDirectory, pszSrcFile, __LINE__); 2369 if (pszTempDir) { 2370 if (WinDlgBox(HWND_DESKTOP, dcd->hwndParent, 2371 WalkAllDlgProc, 2372 FM3ModHandle, WALK_FRAME, MPFROMP(pszTempDir))) { 2373 if (!WinSendMsg(hwnd, UM_SHOWME, MPFROMP(pszTempDir), MPFROMLONG(1))) 2374 free(pszTempDir); 2375 } 2376 else 2377 free(pszTempDir); 2378 } 2370 2379 } 2371 2380 break; … … 2440 2449 } 2441 2450 else 2442 s ave_dir2(newpath);2451 strcpy(newpath, pFM2SaveDirectory); 2443 2452 if (!WinDlgBox(HWND_DESKTOP, dcd->hwndParent, WalkAllDlgProc, 2444 2453 FM3ModHandle, WALK_FRAME,
Note:
See TracChangeset
for help on using the changeset viewer.