From 3deeefebd7042650d3aa92ed3d85eb9715238dc0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 29 Sep 2001 22:15:41 +0000 Subject: [PATCH] fixed assertion failures with invalid icons git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/themes/win32.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/univ/themes/win32.cpp b/src/univ/themes/win32.cpp index 50d6994343..85b7729436 100644 --- a/src/univ/themes/win32.cpp +++ b/src/univ/themes/win32.cpp @@ -3294,8 +3294,11 @@ void wxWin32Renderer::DrawFrameIcon(wxDC& dc, const wxIcon& icon, int flags) { - wxRect r = GetFrameClientArea(rect, flags & ~wxTOPLEVEL_TITLEBAR); - dc.DrawIcon(icon, r.x, r.y); + if ( icon.Ok() ) + { + wxRect r = GetFrameClientArea(rect, flags & ~wxTOPLEVEL_TITLEBAR); + dc.DrawIcon(icon, r.x, r.y); + } } void wxWin32Renderer::DrawFrameButton(wxDC& dc, -- 2.45.2