From cd32920fbd71820a1fd022fc2f870a1331936e74 Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Mon, 5 Jul 2021 13:18:41 +0400 Subject: [PATCH] fix --- src/celestia/win32/winmain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/celestia/win32/winmain.cpp b/src/celestia/win32/winmain.cpp index a84741f57..c78e2a7ff 100644 --- a/src/celestia/win32/winmain.cpp +++ b/src/celestia/win32/winmain.cpp @@ -3059,12 +3059,12 @@ int APIENTRY WinMain(HINSTANCE hInstance, // URL on the command line, send the URL to the running instance // of Celestia before terminating. auto startURL = appCore->getStartURL(); - if (!startURL().empty()) + if (!startURL.empty()) { COPYDATASTRUCT cd; cd.dwData = 0; cd.cbData = startURL.length(); - cd.lpData = reinterpret_cast(const_cast(startURL.c_str())); + cd.lpData = reinterpret_cast(const_cast(startURL.data())); SendMessage(existingWnd, WM_COPYDATA, 0, reinterpret_cast(&cd)); } SetForegroundWindow(existingWnd);