Skip to content

Commit a878cd7

Browse files
authored
Merge pull request #4 from chifandeyu/main
fix startup crash when argc is 1
2 parents 6e36da5 + a9f632e commit a878cd7

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)