Changeset 59071 in vbox for trunk/src/VBox
- Timestamp:
- Dec 9, 2015 10:56:07 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r58866 r59071 2209 2209 2210 2210 /* Here we have to restore host LED lock states. */ 2211 if (m_pHostLedsState) 2212 { 2211 void *pvLedState = m_pHostLedsState; 2212 if (pvLedState) 2213 { 2214 /* bird: I've observed recursive calls here when setting m_pHostLedsState to NULL after calling 2215 WinHidDevicesApplyAndReleaseLedsState. The result is a double free(), which the CRT 2216 usually detects and I could see this->m_pHostLedsState == NULL. The windows function 2217 does dispatch loop fun, that's probably the reason for it. Hopefully not an issue on OS X. */ 2218 m_pHostLedsState = NULL; 2213 2219 #if defined(Q_WS_MAC) 2214 DarwinHidDevicesApplyAndReleaseLedsState( m_pHostLedsState);2220 DarwinHidDevicesApplyAndReleaseLedsState(pvLedState); 2215 2221 #elif defined(Q_WS_WIN) 2216 2222 keyboardHandler()->winSkipKeyboardEvents(true); 2217 WinHidDevicesApplyAndReleaseLedsState( m_pHostLedsState);2223 WinHidDevicesApplyAndReleaseLedsState(pvLedState); 2218 2224 keyboardHandler()->winSkipKeyboardEvents(false); 2219 2225 #else 2220 2226 LogRelFlow(("UIMachineLogic::sltSwitchKeyboardLedsToPreviousLeds: restore host LED lock states does not supported on this platform\n")); 2221 2227 #endif 2222 m_pHostLedsState = NULL;2223 2228 } 2224 2229 }
Note:
See TracChangeset
for help on using the changeset viewer.