Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.1:Staging:E
libqt5-qtwebkit
fix-nullptr-crash-in-QWebPage-selectedHtml-when...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-nullptr-crash-in-QWebPage-selectedHtml-when-selectedRange.patch of Package libqt5-qtwebkit
From 0e75f3272d149bc64899c161f150eb341a2417af Mon Sep 17 00:00:00 2001 From: Konstantin Tokarev <annulen@yandex.ru> Date: Thu, 28 Dec 2017 12:17:21 +0300 Subject: [PATCH] Fix crash in QWebPage::selectedHtml() when selectedRange is nullptr Change-Id: Ia618d5044ab0b4e8293c7d53de936b323982656c --- Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp index 89e872fb208..00dc0c48841 100644 --- a/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp +++ b/Source/WebKit/qt/WebCoreSupport/QWebPageAdapter.cpp @@ -390,7 +390,10 @@ QString QWebPageAdapter::selectedText() const 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 -- 2.16.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor