Skip to content

Commit

Permalink
Fix to return ref from shared()
Browse files Browse the repository at this point in the history
  • Loading branch information
thantthet committed Sep 7, 2021
1 parent 6f0bb4a commit 5489486
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions windows/KeyMagic2/KeyMagic2/HookProc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ void HookProc::SendBackspace(ULONG count)

BOOL HookProc::InitHooks(HWND mainHwnd)
{
assert(this == &HookProc::shared());
ignoreHandleForegroundEvent = mainHwnd;

HH_KEYBOARD_LL = SetWindowsHookEx(WH_KEYBOARD_LL,
Expand Down
2 changes: 1 addition & 1 deletion windows/KeyMagic2/KeyMagic2/HookProc.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class HookProc {
public:
BOOL InitHooks(HWND mainHwnd);

static HookProc shared() {
static HookProc& shared() {
static HookProc shared = HookProc();
return shared;
}
Expand Down

0 comments on commit 5489486

Please sign in to comment.