From a1fffa9fd5792a2d45b03330909f3698b28ca51f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 15 Oct 1999 18:09:45 +0000 Subject: [PATCH] don't draw with NULL font git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/dcclient.cpp | 2 ++ src/gtk1/dcclient.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/gtk/dcclient.cpp b/src/gtk/dcclient.cpp index 1c67530fae..cdd1f13950 100644 --- a/src/gtk/dcclient.cpp +++ b/src/gtk/dcclient.cpp @@ -762,6 +762,8 @@ void wxWindowDC::DoDrawText( const wxString &text, long x, long y ) GdkFont *font = m_font.GetInternalFont( m_scaleY ); + wxCHECK_RET( font, wxT("invalid font") ); + x = XLOG2DEV(x); y = YLOG2DEV(y); diff --git a/src/gtk1/dcclient.cpp b/src/gtk1/dcclient.cpp index 1c67530fae..cdd1f13950 100644 --- a/src/gtk1/dcclient.cpp +++ b/src/gtk1/dcclient.cpp @@ -762,6 +762,8 @@ void wxWindowDC::DoDrawText( const wxString &text, long x, long y ) GdkFont *font = m_font.GetInternalFont( m_scaleY ); + wxCHECK_RET( font, wxT("invalid font") ); + x = XLOG2DEV(x); y = YLOG2DEV(y); -- 2.45.2