Make EDIT_UnlockBuffer cope with destroyed windows.

diff --git a/controls/edit.c b/controls/edit.c
index caec3e8..0e1e531 100644
--- a/controls/edit.c
+++ b/controls/edit.c
@@ -2154,6 +2154,13 @@
  */
 static void EDIT_UnlockBuffer(WND *wnd, EDITSTATE *es, BOOL force)
 {
+    /* Edit window might be already destroyed */
+    if(!IsWindow(wnd->hwndSelf))
+    {
+	WARN("edit wnd %04x already destroyed\n", wnd->hwndSelf);
+	return;
+    }
+
 	if (!es) {
 		ERR("no EDITSTATE ... please report\n");
 		return;