projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f499bc2
)
Add null check for avoiding std::string crash
69/258669/2
accepted/tizen_4.0_unified
tizen_4.0
accepted/tizen/4.0/unified/20210524.092503
submit/tizen_4.0/20210524.073531
author
SangYong Park
<sy302.park@samsung.com>
Mon, 24 May 2021 02:37:21 +0000
(11:37 +0900)
committer
SangYong Park
<sy302.park@samsung.com>
Mon, 24 May 2021 07:33:32 +0000
(16:33 +0900)
ewk_view_url_get() can return nullptr, but std::string constructor
with nullptr causes crash. so add null check before construction.
Change-Id: I76e32366a27d307e82778150d5235696f68f99a9
Signed-off-by: SangYong Park <sy302.park@samsung.com>
runtime/browser/web_view_impl.cc
patch
|
blob
|
history
diff --git
a/runtime/browser/web_view_impl.cc
b/runtime/browser/web_view_impl.cc
index
db7de49
..
0f209cd
100755
(executable)
--- a/
runtime/browser/web_view_impl.cc
+++ b/
runtime/browser/web_view_impl.cc
@@
-967,7
+967,8
@@
void WebViewImpl::InitRotaryEventCallback() {
}
std::string WebViewImpl::GetUrl() {
- return std::string(ewk_view_url_get(ewk_view_));
+ auto url = ewk_view_url_get(ewk_view_);
+ return std::string(url ? url : "");
}
Evas_Object* WebViewImpl::evas_object() const {