don't crash on zero length string in DoDrawRotatedText

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-05-25 02:40:58 +00:00
parent 93664d1bff
commit 1c2d839fbf

View File

@@ -1586,16 +1586,17 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
void wxWindowDC::DoDrawRotatedText( const wxString &text, wxCoord x, wxCoord y, double angle )
{
if (!m_window || text.empty())
return;
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if ( wxIsNullDouble(angle) )
{
DrawText(text, x, y);
return;
}
wxCHECK_RET( Ok(), wxT("invalid window dc") );
if (!m_window) return;
wxCoord w;
wxCoord h;