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:
@@ -557,6 +557,8 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // otherwise just scroll the window
|
else { // otherwise just scroll the window
|
||||||
|
if ( !delta )
|
||||||
|
delta = 120;
|
||||||
wheelRotation += rotation;
|
wheelRotation += rotation;
|
||||||
lines = wheelRotation / delta;
|
lines = wheelRotation / delta;
|
||||||
wheelRotation -= lines * delta;
|
wheelRotation -= lines * delta;
|
||||||
|
@@ -557,6 +557,8 @@ void ScintillaWX::DoMouseWheel(int rotation, int delta,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { // otherwise just scroll the window
|
else { // otherwise just scroll the window
|
||||||
|
if ( !delta )
|
||||||
|
delta = 120;
|
||||||
wheelRotation += rotation;
|
wheelRotation += rotation;
|
||||||
lines = wheelRotation / delta;
|
lines = wheelRotation / delta;
|
||||||
wheelRotation -= lines * delta;
|
wheelRotation -= lines * delta;
|
||||||
|
Reference in New Issue
Block a user