Fix for potential divide by zero error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18433 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
762e199741
commit
91f580b235
@ -557,6 +557,8 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta,
|
||||
}
|
||||
}
|
||||
else { // otherwise just scroll the window
|
||||
if ( !delta )
|
||||
delta = 120;
|
||||
wheelRotation += rotation;
|
||||
lines = wheelRotation / delta;
|
||||
wheelRotation -= lines * delta;
|
||||
|
@ -557,6 +557,8 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta,
|
||||
}
|
||||
}
|
||||
else { // otherwise just scroll the window
|
||||
if ( !delta )
|
||||
delta = 120;
|
||||
wheelRotation += rotation;
|
||||
lines = wheelRotation / delta;
|
||||
wheelRotation -= lines * delta;
|
||||
|
Loading…
Reference in New Issue
Block a user