From 1fe622550d87d04ddb820976d74b2d7fa42682de Mon Sep 17 00:00:00 2001 From: Scott Graham Date: Tue, 5 Apr 2016 13:18:30 -0700 Subject: [PATCH] win: Check that UseHandler() has been called in DumpAndCrash() Change-Id: I16ee8bf4ccb54a26dfd35551ab1ea1be838a9207 Reviewed-on: https://chromium-review.googlesource.com/337300 Reviewed-by: Mark Mentovai --- client/crashpad_client_win.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/crashpad_client_win.cc b/client/crashpad_client_win.cc index 79412abc..1f106865 100644 --- a/client/crashpad_client_win.cc +++ b/client/crashpad_client_win.cc @@ -461,6 +461,11 @@ void CrashpadClient::DumpWithoutCrash(const CONTEXT& context) { // static void CrashpadClient::DumpAndCrash(EXCEPTION_POINTERS* exception_pointers) { + if (g_signal_exception == INVALID_HANDLE_VALUE) { + LOG(ERROR) << "haven't called UseHandler()"; + return; + } + UnhandledExceptionHandler(exception_pointers); }