quick and dirty fix for the division by 0 crash in OnKeyDown()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
d5536adedf
commit
92fa3a1314
@ -616,6 +616,14 @@ void wxScrolledWindow::OnPaint(wxPaintEvent& WXUNUSED(event))
|
|||||||
// kbd handling
|
// kbd handling
|
||||||
void wxScrolledWindow::OnKeyDown(wxKeyEvent& event)
|
void wxScrolledWindow::OnKeyDown(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
|
if ( !m_xScrollPixelsPerLine || !m_yScrollPixelsPerLine )
|
||||||
|
{
|
||||||
|
// stop now - no scroll line size
|
||||||
|
event.Skip();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
int stx, sty, // view origin
|
int stx, sty, // view origin
|
||||||
szx, szy, // view size (total)
|
szx, szy, // view size (total)
|
||||||
clix, cliy; // view size (on screen)
|
clix, cliy; // view size (on screen)
|
||||||
|
Loading…
Reference in New Issue
Block a user