mirror of
https://github.com/reactos/reactos.git
synced 2024-10-04 16:36:11 +00:00
add a NULL pointer check
See issue #2508 for more details. svn path=/trunk/; revision=28050
This commit is contained in:
parent
cb9cf60a0d
commit
b430b691ac
|
@ -512,7 +512,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||
HKEY hRootKey;
|
||||
HKEY hKey = NULL;
|
||||
LPNMTVDISPINFO ptvdi;
|
||||
LONG lResult;
|
||||
LONG lResult = ERROR_SUCCESS;
|
||||
TCHAR szBuffer[MAX_PATH];
|
||||
|
||||
ptvdi = (LPNMTVDISPINFO) lParam;
|
||||
|
@ -531,7 +531,7 @@ LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
|
|||
{
|
||||
lResult = RegRenameKey(hRootKey, keyPath, ptvdi->item.pszText);
|
||||
}
|
||||
return lResult == ERROR_SUCCESS;
|
||||
return lResult;
|
||||
}
|
||||
}
|
||||
default:
|
||||
|
|
|
@ -1606,6 +1606,9 @@ LONG RegRenameKey(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpNewName)
|
|||
LPTSTR lpNewSubKey = NULL;
|
||||
LONG Ret = 0;
|
||||
|
||||
if (!lpSubKey)
|
||||
return Ret;
|
||||
|
||||
s = _tcsrchr(lpSubKey, _T('\\'));
|
||||
if (s)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue