James Hawkins : msi: Cleanup the dialog event subscriptions when destroying the dialog.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 21 06:00:57 CST 2007


Module: wine
Branch: master
Commit: 0746b9076d2c32906de4d291e1ce8f809927988c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0746b9076d2c32906de4d291e1ce8f809927988c

Author: James Hawkins <truiken at gmail.com>
Date:   Tue Feb 20 14:16:10 2007 -0600

msi: Cleanup the dialog event subscriptions when destroying the dialog.

---

 dlls/msi/dialog.c  |    3 +++
 dlls/msi/events.c  |    3 +--
 dlls/msi/msipriv.h |    1 +
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c
index a542546..28fb2e9 100644
--- a/dlls/msi/dialog.c
+++ b/dlls/msi/dialog.c
@@ -3429,6 +3429,9 @@ void msi_dialog_destroy( msi_dialog *dialog )
     if( dialog->hwnd )
         DestroyWindow( dialog->hwnd );
 
+    /* unsubscribe events */
+    ControlEvent_CleanupDialogSubscriptions(dialog->package, dialog->name);
+
     /* destroy the list of controls */
     while( !list_empty( &dialog->controls ) )
     {
diff --git a/dlls/msi/events.c b/dlls/msi/events.c
index 4ddab41..714e060 100644
--- a/dlls/msi/events.c
+++ b/dlls/msi/events.c
@@ -54,7 +54,6 @@ struct subscriber {
 };
 
 static UINT ControlEvent_HandleControlEvent(MSIPACKAGE *, LPCWSTR, LPCWSTR, msi_dialog*);
-static VOID ControlEvent_CleanupDialogSubscriptions(MSIPACKAGE *package, LPWSTR dialog);
 
 /*
  * Create a dialog box and run it if it's modal
@@ -321,7 +320,7 @@ VOID ControlEvent_FireSubscribedEvent( MSIPACKAGE *package, LPCWSTR event,
     }
 }
 
-static VOID ControlEvent_CleanupDialogSubscriptions(MSIPACKAGE *package, LPWSTR dialog)
+VOID ControlEvent_CleanupDialogSubscriptions(MSIPACKAGE *package, LPWSTR dialog)
 {
     struct list *i, *t;
     struct subscriber *sub;
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index b01bb27..971f71e 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -781,6 +781,7 @@ extern void msi_ui_error( DWORD msg_id, DWORD type );
 /* control event stuff */
 extern VOID ControlEvent_FireSubscribedEvent(MSIPACKAGE *package, LPCWSTR event,
                                       MSIRECORD *data);
+extern VOID ControlEvent_CleanupDialogSubscriptions(MSIPACKAGE *package, LPWSTR dialog);
 extern VOID ControlEvent_CleanupSubscriptions(MSIPACKAGE *package);
 extern VOID ControlEvent_SubscribeToEvent(MSIPACKAGE *package, msi_dialog *dialog,
                                       LPCWSTR event, LPCWSTR control, LPCWSTR attribute);




More information about the wine-cvs mailing list