Troy Rollo wine@troy.rollo.name writes:
The following change seems to prevent the SEGV that frequently occurs when you double-click on a folder in the file open/save dialogs. This fix uses IsWindow() to test if the ListView still exists. I have handled all notifications other than those where it seems entirely implausible that the callback could destroy the window.
I think it would be a lot cleaner to put the IsWindow test in the notify functions and make them return FALSE (or some appropriate code) when the window is destroyed. Then all you have to do in the callers is check the result instead of duplicating the IsWindow calls all over the place.
On Wed, 12 Oct 2005 06:05, Alexandre Julliard wrote:
I think it would be a lot cleaner to put the IsWindow test in the notify functions and make them return FALSE (or some appropriate code) when the window is destroyed. Then all you have to do in the callers is check the result instead of duplicating the IsWindow calls all over the place.
In most cases this would work, but there are a few cases where a value returned from the callback is used or tested for something else, including one where a return is made if the return value is !FALSE and not if it is FALSE, and one where execution should continue regardless of the return value of the notification. The latter is more problematic since it would require either some magic value that we hope the app does not return or a different notification function that does not interfere with the value returned by the application.