mirror of
https://github.com/reactos/reactos.git
synced 2024-07-20 03:16:12 +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 hRootKey;
|
||||||
HKEY hKey = NULL;
|
HKEY hKey = NULL;
|
||||||
LPNMTVDISPINFO ptvdi;
|
LPNMTVDISPINFO ptvdi;
|
||||||
LONG lResult;
|
LONG lResult = ERROR_SUCCESS;
|
||||||
TCHAR szBuffer[MAX_PATH];
|
TCHAR szBuffer[MAX_PATH];
|
||||||
|
|
||||||
ptvdi = (LPNMTVDISPINFO) lParam;
|
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);
|
lResult = RegRenameKey(hRootKey, keyPath, ptvdi->item.pszText);
|
||||||
}
|
}
|
||||||
return lResult == ERROR_SUCCESS;
|
return lResult;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -1606,6 +1606,9 @@ LONG RegRenameKey(HKEY hKey, LPCTSTR lpSubKey, LPCTSTR lpNewName)
|
||||||
LPTSTR lpNewSubKey = NULL;
|
LPTSTR lpNewSubKey = NULL;
|
||||||
LONG Ret = 0;
|
LONG Ret = 0;
|
||||||
|
|
||||||
|
if (!lpSubKey)
|
||||||
|
return Ret;
|
||||||
|
|
||||||
s = _tcsrchr(lpSubKey, _T('\\'));
|
s = _tcsrchr(lpSubKey, _T('\\'));
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue