vbRichClient/vbWidgets — pull request #7 by LbrtPavol (2013-05-31 15:54:30+00:00)
Title: Unhandled error (91) in PopUp_CheckForAdditionalCloseConditions.

After the call to DestroyPopup on line 302, all menus are destroyed, so mInitiatorWidget is set to nothing: now the line 303 raise an error (91) at runtime.
Step to reproduce:
1. launch the MenuBarDemo.vbp;
2. press Alt + E (menu Edit is shown);
3. press Alt + Backspace and set the focus to another window;
4. press Alt + Backspace until you return to the MenuBarDemo;
5. press Alt + E: the error is raised.

I think that after the call to DestroyPopup it's safe to exit the sub.