msi: Don't access the list of controls after the dialog is destroyed.

This commit is contained in:
Mike McCormack 2006-11-21 13:48:07 +09:00 committed by Alexandre Julliard
parent 6a2fb05451
commit ed663fe216
1 changed files with 6 additions and 0 deletions

View File

@ -175,6 +175,8 @@ static msi_control *msi_dialog_find_control( msi_dialog *dialog, LPCWSTR name )
if( !name )
return NULL;
if( !dialog->hwnd )
return NULL;
LIST_FOR_EACH_ENTRY( control, &dialog->controls, msi_control, entry )
if( !strcmpW( control->name, name ) ) /* FIXME: case sensitive? */
return control;
@ -187,6 +189,8 @@ static msi_control *msi_dialog_find_control_by_type( msi_dialog *dialog, LPCWSTR
if( !type )
return NULL;
if( !dialog->hwnd )
return NULL;
LIST_FOR_EACH_ENTRY( control, &dialog->controls, msi_control, entry )
if( !strcmpW( control->type, type ) ) /* FIXME: case sensitive? */
return control;
@ -197,6 +201,8 @@ static msi_control *msi_dialog_find_control_by_hwnd( msi_dialog *dialog, HWND hw
{
msi_control *control;
if( !dialog->hwnd )
return NULL;
LIST_FOR_EACH_ENTRY( control, &dialog->controls, msi_control, entry )
if( hwnd == control->hwnd )
return control;