https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ffc4febb0cda008e8f693f...
commit ffc4febb0cda008e8f693fc4d67c700bb7cb413f Author: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org AuthorDate: Fri Sep 17 18:58:07 2021 +0200 Commit: Hermès Bélusca-Maïto hermes.belusca-maito@reactos.org CommitDate: Sun Sep 19 00:17:04 2021 +0200
[BROWSEUI] Fix early error handling, to be taken only when ParseNow() is run (and fixes "Use of uninitialized variable hr" RTC error). Addendum to commit d8e47d61. --- dll/win32/browseui/addresseditbox.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dll/win32/browseui/addresseditbox.cpp b/dll/win32/browseui/addresseditbox.cpp index 4d7b3dc7c57..4e018cc5bc1 100644 --- a/dll/win32/browseui/addresseditbox.cpp +++ b/dll/win32/browseui/addresseditbox.cpp @@ -168,8 +168,8 @@ cleanup: if (pidlCurrent) ILFree(pidlCurrent); if (address != input) - delete [] address; - delete [] input; + delete[] address; + delete[] input;
return hr; } @@ -192,19 +192,19 @@ HRESULT STDMETHODCALLTYPE CAddressEditBox::Execute(long paramC) HRESULT hr;
/* - * Parse the path is it wasn't parsed + * Parse the path if it wasn't parsed */ if (!pidlLastParsed) + { hr = ParseNow(0);
- /* - * If the destination path doesn't exist then display an error message - */ - if (hr == HRESULT_FROM_WIN32(ERROR_INVALID_DRIVE) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) - return ShowFileNotFoundError(hr); + /* If the destination path doesn't exist then display an error message */ + if (hr == HRESULT_FROM_WIN32(ERROR_INVALID_DRIVE) || hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)) + return ShowFileNotFoundError(hr);
- if (!pidlLastParsed) - return E_FAIL; + if (!pidlLastParsed) + return E_FAIL; + }
/* * Get the IShellBrowser and IBrowserService interfaces of the shell browser