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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user