From 3be7fb9510875f4123cc7be0c8c066c8526f9301 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sat, 9 Nov 2013 23:22:33 +0100 Subject: [PATCH] Make sure mutex is always initialized (fixes issue #1976) Signed-off-by: Sven Strickroth --- src/Changelog.txt | 1 + src/TortoiseProc/GravatarPictureBox.cpp | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index ac014db28..b21de9336 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -16,6 +16,7 @@ Released: Unreleased * Fixed issue #1951: Slow switch/checkout dialog * Fixed issue #1958: Revision graph crashes when trying to switch/checkout via context menu * Fixed issue #1963: TortoiseGitMerge: Missing color config when an added line is changed + * Fixed issue #1976: Commit log crashes if it receives a WM_PRINTCLIENT while opening = Release 1.8.6.0 = Released: 2013-10-20 diff --git a/src/TortoiseProc/GravatarPictureBox.cpp b/src/TortoiseProc/GravatarPictureBox.cpp index ceceb34af..6859aedbb 100644 --- a/src/TortoiseProc/GravatarPictureBox.cpp +++ b/src/TortoiseProc/GravatarPictureBox.cpp @@ -75,6 +75,7 @@ CGravatar::CGravatar() , m_gravatarExit(false) , m_bEnableGravatar(false) { + m_gravatarLock.Init(); } CGravatar::~CGravatar() @@ -90,10 +91,7 @@ void CGravatar::Init() if (m_bEnableGravatar) { if (m_gravatarEvent == INVALID_HANDLE_VALUE) - { m_gravatarEvent = ::CreateEvent(nullptr, FALSE, TRUE, nullptr); - m_gravatarLock.Init(); - } if (m_gravatarThread == nullptr) { m_gravatarThread = AfxBeginThread([] (LPVOID lpVoid) -> UINT { ((CGravatar *)lpVoid)->GravatarThread(); return 0; }, this, THREAD_PRIORITY_BELOW_NORMAL); -- 2.11.4.GIT