From: Thomas Geymayer Date: Wed, 30 Jul 2014 21:54:04 +0000 (+0200) Subject: Do not assume there is a mouse mode with index 3. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=90f197fbc41628c00a9d8b6bf79a42cf6a5e59c2;p=flightgear.git Do not assume there is a mouse mode with index 3. --- diff --git a/src/Input/FGMouseInput.cxx b/src/Input/FGMouseInput.cxx index 6d052c881..90a5efde9 100644 --- a/src/Input/FGMouseInput.cxx +++ b/src/Input/FGMouseInput.cxx @@ -641,7 +641,7 @@ void FGMouseInput::processMotion(int x, int y, const osgGA::GUIEventAdapter* ea) mouse &m = d->mice[0]; int modeIndex = m.current_mode; // are we in spring-loaded look mode? - if (!d->rightClickModeCycle) { + if (!d->rightClickModeCycle && m.nModes > 3) { if (m.mouse_button_nodes[2]->getBoolValue()) { // right mouse is down, force look mode modeIndex = 3;