summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Brianceau <jbriance@cisco.com>2014-08-13 11:07:58 +0200
committerJulien Brianceau <jbriance@cisco.com>2014-08-13 11:19:07 +0200
commit593ea5a6fdd5d057387615935bf6eeaed5888de9 (patch)
tree4638e1563ef5fadb3e65535f689de150446861f7
parenteb611b3f830cb4af80baabadc1f4e71f284ab786 (diff)
downloadqtwebkit-593ea5a6fdd5d057387615935bf6eeaed5888de9.tar.gz
Fix crash in DeviceOrientationController when !HAVE(QTSENSORS)
Regression introduced by QSensors leak fix (QTBUG-38857). Change-Id: I22dd4f774012ef9b8af9ba8b59e1e4603a3ebbf4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
-rw-r--r--Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp6
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