summaryrefslogtreecommitdiffstats
path: root/abs/core/qt5-webkit/qt5-webkit-null-pointer-dereference.patch
blob: 97b9f9ea1b6453eaf708a6d0236ee9bc7fe90098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff -ur qtwebkit-5.212.0-alpha2/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp 
qtwebkit-5.212.0-alpha2-fix-null-pointer-dereference/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp
--- qtwebkit-5.212.0-alpha2/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp	2017-06-09 16:11:36.000000000 +0200
+++ qtwebkit-5.212.0-alpha2-fix-null-pointer-dereference/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp	2017-10-24 21:44:40.504943501 
+0200
@@ -390,7 +390,10 @@
 
 QString QWebPageAdapter::selectedHtml() const
 {
-    return page->focusController().focusedOrMainFrame().editor().selectedRange()->toHTML();
+    RefPtr<Range> range = page->focusController().focusedOrMainFrame().editor().selectedRange();
+    if (!range)
+        return QString();
+    return range->toHTML();
 }
 
 bool QWebPageAdapter::isContentEditable() const