Changeset 1786 for trunk/dll/dircnrs.c


Ignore:
Timestamp:
Aug 30, 2014, 10:03:35 PM (11 years ago)
Author:
Gregg Young
Message:

Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents a trap when FM2 is shutdown while directory containers are still populating (Ticket 535)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/dircnrs.c

    r1778 r1786  
    8686  02 Mar 14 GKY Speed up intial drive scans Ticket 528
    8787  26 Jun 14 SHL Rework DirObjWndProc UM_RESCAN to avoid hanging FM/2 Lite when tree hidden
     88  30 Aug 14 GKY Add semaphore hmtxFiltering to prevent freeing dcd while filtering. Prevents
     89                a trap when FM2 is shutdown while directory containers are still populating
    8890
    8991***********************************************************************/
     
    12101212                        0,
    12111213                        0,
    1212                         SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER);
     1214                        SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER);
     1215      DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT);
    12131216      FreeList(dcd->lastselection);
    12141217      WinSetWindowPtr(dcd->hwndCnr, QWL_USER, NULL);    // 13 Apr 10 SHL Set NULL before freeing dcd
     
    16301633      }
    16311634      // 2014-06-11 SHL fm/2 lite can get here before drive scan completes
    1632       if (!fInitialDriveScan)
    1633         PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID);
     1635      //if (!fInitialDriveScan) // 2014-08-30 GKY This doesn't seem to be needed
     1636        PostMsg(hwnd, UM_SETUP2, MPVOID, MPVOID);
    16341637    }
    16351638    else {
     
    35223525                        0,
    35233526                        0,
    3524                         SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER);
     3527                        SWP_RESTORE | SWP_SHOW | SWP_ACTIVATE | SWP_ZORDER);
     3528      DosRequestMutexSem(hmtxFiltering, SEM_INDEFINITE_WAIT);
    35253529      FreeList(dcd->lastselection);
    35263530      free(dcd);
Note: See TracChangeset for help on using the changeset viewer.