File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/Snap.Hutao.Remastered.Native Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ BOOL HutaoNativeProcess::CreateProcessInternal()
6969 // 创建进程
7070 BOOL success = CreateProcessW (
7171 m_startInfo.ApplicationName , // 应用程序名称
72- commandLine.IsEmpty () ? nullptr : & commandLine[ 0 ] , // 命令行
72+ commandLine.IsEmpty () ? nullptr : commandLine. Data () , // 命令行
7373 nullptr , // 进程安全属性
7474 nullptr , // 线程安全属性
7575 m_startInfo.InheritHandles , // 继承句柄
@@ -89,11 +89,9 @@ HRESULT __stdcall HutaoNativeProcess::Start()
8989 {
9090 return HRESULT_FROM_WIN32 (ERROR_ALREADY_EXISTS);
9191 }
92-
93- if (m_startInfo.ApplicationName == nullptr && m_startInfo.CommandLine == nullptr )
94- {
95- return E_INVALIDARG;
96- }
92+
93+ AssertNonNullAndReturn (m_startInfo.ApplicationName );
94+ AssertNonNullAndReturn (m_startInfo.CommandLine );
9795
9896 if (!CreateProcessInternal ())
9997 {
You can’t perform that action at this time.
0 commit comments