changeset 589:bb439280ece2

Escape out of _free_window_memory() if we are being called on an embedded Internet Explorer browser instance.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 23 May 2005 07:54:10 +0000
parents 1b398af1ec38
children 2111cdb6c451
files win/dw.c
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/win/dw.c	Mon May 23 01:43:36 2005 +0000
+++ b/win/dw.c	Mon May 23 07:54:10 2005 +0000
@@ -346,14 +346,18 @@
 	HICON oldicon = (HICON)SendMessage(handle, WM_GETICON, 0, 0);
 	char tmpbuf[100];
 
+	GetClassName(handle, tmpbuf, 99);
+
+	/* Don't try to free memory from an OLE embedded IE */
+	if(strncmp(tmpbuf, "Internet Explorer_Server", 25) == 0)
+		return TRUE;
+
 	/* Delete font, icon and bitmap GDI objects in use */
 	if(oldfont)
 		DeleteObject(oldfont);
 	if(oldicon)
 		DeleteObject(oldicon);
 
-	GetClassName(handle, tmpbuf, 99);
-
 	if(strnicmp(tmpbuf, STATICCLASSNAME, strlen(STATICCLASSNAME)+1)==0)
 	{
 		HBITMAP oldbitmap = (HBITMAP)SendMessage(handle, STM_GETIMAGE, IMAGE_BITMAP, 0);