diff options
| -rw-r--r-- | Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp index 13fbe88d3..ca0f7d371 100644 --- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp +++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp @@ -258,8 +258,10 @@ void QWebPageAdapter::initializeWebCorePage() m_deviceMotionClient = new DeviceMotionClientQt; } #endif - WebCore::provideDeviceOrientationTo(page, m_deviceOrientationClient); - WebCore::provideDeviceMotionTo(page, m_deviceMotionClient); + if (m_deviceOrientationClient) + WebCore::provideDeviceOrientationTo(page, m_deviceOrientationClient); + if (m_deviceMotionClient) + WebCore::provideDeviceMotionTo(page, m_deviceMotionClient); #endif // By default each page is put into their own unique page group, which affects popup windows |
