Ignore:
Timestamp:
Jun 14, 2001, 4:49:19 PM (24 years ago)
Author:
sandervl
Message:

temporary workaround added for opera crash

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/HOOK.CPP

    r5973 r6012  
    1 /* $Id: HOOK.CPP,v 1.21 2001-06-12 17:02:33 sandervl Exp $ */
     1/* $Id: HOOK.CPP,v 1.22 2001-06-14 14:49:16 sandervl Exp $ */
    22
    33/*
     
    9999static HANDLE HOOK_threadHooks[WH_NB_HOOKS] = { 0 };
    100100static CRITICAL_SECTION threadCritSect = {0};
     101static BOOL fInitHook = FALSE;
    101102
    102103#ifdef GLOBAL_HOOKS
    103104#define SYSTEMHOOK_LOCK()       systemHookMutex.enter(VMUTEX_WAIT_FOREVER, &hGlobalHookMutex);
    104105#define SYSTEMHOOK_UNLOCK()     systemHookMutex.leave(&hGlobalHookMutex);
     106#define INIT_SYSTEMHOOK()       aldkjfslfjsdlkfj
    105107#else
    106108#define SYSTEMHOOK_LOCK()       EnterCriticalSection(&systemCritSect);
    107109#define SYSTEMHOOK_UNLOCK()     LeaveCriticalSection(&systemCritSect);
     110#define INIT_SYSTEMHOOK()       InitializeCriticalSection(&systemCritSect);
    108111#endif
    109112
     
    300303        SetLastError(ERROR_INVALID_PARAMETER);
    301304        return 0;
     305    }
     306
     307    if(!fInitHook) {
     308        InitializeCriticalSection(&threadCritSect);
     309        INIT_SYSTEMHOOK();
     310        fInitHook = TRUE;
    302311    }
    303312
     
    367376
    368377    dprintf(("Removing hook %08x\n", data));
     378
     379    if(!fInitHook) {
     380        InitializeCriticalSection(&threadCritSect);
     381        INIT_SYSTEMHOOK();
     382        fInitHook = TRUE;
     383    }
    369384
    370385    if (data->flags & HOOK_INUSE)
Note: See TracChangeset for help on using the changeset viewer.