Skip to content

Commit a9f632e

Browse files
author
yuchang.xu
committed
fix startup crash when argc is 1
1 parent 6e36da5 commit a9f632e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

windows/protocol_handler_plugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ void ProtocolHandlerPluginRegisterWithRegistrar(
137137
void DispatchToProtocolHandler(HWND hwnd) {
138138
int argc;
139139
wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc);
140-
if (argv == nullptr) {
140+
if (argv == nullptr || argc < 2) {
141141
return;
142142
}
143143

0 commit comments

Comments
 (0)