--- old/src/windows/native/sun/windows/awt_Font.cpp 2012-10-25 17:02:24.319075300 +0400 +++ new/src/windows/native/sun/windows/awt_Font.cpp 2012-10-25 17:02:23.589033600 +0400 @@ -150,6 +150,7 @@ AwtFont::~AwtFont() { + delete[] m_hFont; } void AwtFont::Dispose() { @@ -160,11 +161,12 @@ /* NOTE: delete of windows HFONT happens in FontCache::Remove only when the final reference to the font is disposed */ } else if (font != NULL) { - // if font was not in cache, its not shared and we delete it now - VERIFY(::DeleteObject(font)); + // if font was not in cache, its not shared and we delete it now + DASSERT(::GetObjectType(font) == OBJ_FONT); + VERIFY(::DeleteObject(font)); } + m_hFont[i] = NULL; } - delete[] m_hFont; AwtObject::Dispose(); }