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);