Module: wine Branch: master Commit: ed663fe216e1d566fadea0cf7cfeea646667eb9c URL: http://source.winehq.org/git/wine.git/?a=commit;h=ed663fe216e1d566fadea0cf7c...
Author: Mike McCormack mike@codeweavers.com Date: Tue Nov 21 13:48:07 2006 +0900
msi: Don't access the list of controls after the dialog is destroyed.
---
dlls/msi/dialog.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index c13bcc4..b050497 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -175,6 +175,8 @@ static msi_control *msi_dialog_find_cont
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_cont
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_cont { msi_control *control;
+ if( !dialog->hwnd ) + return NULL; LIST_FOR_EACH_ENTRY( control, &dialog->controls, msi_control, entry ) if( hwnd == control->hwnd ) return control;