mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-14 15:31:24 +02:00
MacOS: fix crash when touchscreen device is nullptr.
This commit is contained in:
parent
dc6ab167e4
commit
7fd40a5d10
1 changed files with 4 additions and 4 deletions
|
@ -2746,7 +2746,7 @@ void Application::touchUpdateEvent(QTouchEvent* event) {
|
|||
if (_keyboardMouseDevice->isActive()) {
|
||||
_keyboardMouseDevice->touchUpdateEvent(event);
|
||||
}
|
||||
if (_touchscreenDevice->isActive()) {
|
||||
if (_touchscreenDevice && _touchscreenDevice->isActive()) {
|
||||
_touchscreenDevice->touchUpdateEvent(event);
|
||||
}
|
||||
}
|
||||
|
@ -2767,7 +2767,7 @@ void Application::touchBeginEvent(QTouchEvent* event) {
|
|||
if (_keyboardMouseDevice->isActive()) {
|
||||
_keyboardMouseDevice->touchBeginEvent(event);
|
||||
}
|
||||
if (_touchscreenDevice->isActive()) {
|
||||
if (_touchscreenDevice && _touchscreenDevice->isActive()) {
|
||||
_touchscreenDevice->touchBeginEvent(event);
|
||||
}
|
||||
|
||||
|
@ -2787,7 +2787,7 @@ void Application::touchEndEvent(QTouchEvent* event) {
|
|||
if (_keyboardMouseDevice->isActive()) {
|
||||
_keyboardMouseDevice->touchEndEvent(event);
|
||||
}
|
||||
if (_touchscreenDevice->isActive()) {
|
||||
if (_touchscreenDevice && _touchscreenDevice->isActive()) {
|
||||
_touchscreenDevice->touchEndEvent(event);
|
||||
}
|
||||
|
||||
|
@ -2795,7 +2795,7 @@ void Application::touchEndEvent(QTouchEvent* event) {
|
|||
}
|
||||
|
||||
void Application::touchGestureEvent(QGestureEvent* event) {
|
||||
if (_touchscreenDevice->isActive()) {
|
||||
if (_touchscreenDevice && _touchscreenDevice->isActive()) {
|
||||
_touchscreenDevice->touchGestureEvent(event);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue