Fixes crash when calling Treeview_EndEditLabelNow and no node is

currently edited.
This commit is contained in:
Gerard Patel 2000-05-25 23:00:46 +00:00 committed by Alexandre Julliard
parent 820da77db3
commit bfd5b31a0e
1 changed files with 5 additions and 3 deletions

View File

@ -3116,7 +3116,7 @@ TREEVIEW_EndEditLabelNow (HWND hwnd, WPARAM wParam, LPARAM lParam)
else if( newText!=NULL )
{
/*
** Is really this necasery? shouldnt an app update its internal data in TVN_ENDLABELEDITA?
** Is really this necessary? shouldnt an app update its internal data in TVN_ENDLABELEDITA?
*/
if( !bRevert )
{
@ -3910,10 +3910,11 @@ TREEVIEW_SetScrollTime (HWND hwnd, UINT uScrollTime)
static LRESULT WINAPI
TREEVIEW_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
TREEVIEW_INFO *infoPtr;
if (uMsg==WM_CREATE)
return TREEVIEW_Create (hwnd, wParam, lParam);
if (!TREEVIEW_GetInfoPtr(hwnd))
if (!(infoPtr = TREEVIEW_GetInfoPtr(hwnd)))
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
switch (uMsg) {
@ -3998,7 +3999,8 @@ TREEVIEW_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TREEVIEW_SortChildrenCB(hwnd, wParam, lParam);
case TVM_ENDEDITLABELNOW:
return TREEVIEW_EndEditLabelNow (hwnd, wParam, lParam);
if (infoPtr->editItem)
return TREEVIEW_EndEditLabelNow (hwnd, wParam, lParam);
case TVM_GETISEARCHSTRINGA:
FIXME("Unimplemented msg TVM_GETISEARCHSTRINGA\n");