From 545c9f5bedb350042659842ae4f44d4a0a5d87de Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 25 May 2016 13:45:25 +0900 Subject: [PATCH] Ignore invalid parameter error in Electron --- atom/app/atom_main_delegate.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index ff7ba0894f..9ce8dc504a 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -30,6 +30,13 @@ bool IsBrowserProcess(base::CommandLine* cmd) { return process_type.empty(); } +#if defined(OS_WIN) +void InvalidParameterHandler(const wchar_t*, const wchar_t*, const wchar_t*, + unsigned int, uintptr_t) { + // noop. +} +#endif + } // namespace AtomMainDelegate::AtomMainDelegate() { @@ -87,6 +94,11 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { SetUpBundleOverrides(); #endif +#if defined(OS_WIN) + // Ignore invalid parameter errors. + _set_invalid_parameter_handler(InvalidParameterHandler); +#endif + return brightray::MainDelegate::BasicStartupComplete(exit_code); }