You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
842 B
15 lines
842 B
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
|
|
|