PKGBUILDs/extra/qt5-webkit/qt5-webkit-null-pointer-dereference.patch
2017-11-04 16:37:47 +00:00

17 lines
844 B
Diff

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