projects
/
platform
/
core
/
graphics
/
tizenvg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
858bb9b
)
tvgShape: fixed missing check in Shape::fill
97/242397/1
author
Mateusz Palkowski
<m.palkowski@samsung.com>
Wed, 26 Aug 2020 09:26:40 +0000
(11:26 +0200)
committer
Mateusz Palkowski
<m.palkowski@samsung.com>
Wed, 26 Aug 2020 09:31:11 +0000
(11:31 +0200)
Without this check, setting same fill twice results in crash later.
Change-Id: I38e7026c52a250f65923c4e3008868ed471bf885
src/lib/tvgShape.cpp
patch
|
blob
|
history
diff --git
a/src/lib/tvgShape.cpp
b/src/lib/tvgShape.cpp
index 8db945d77a84aad136d00d83aec8d3d95ad3e92a..8d0beb8c415200c59a13a662054bac1b0484ff7f 100644
(file)
--- a/
src/lib/tvgShape.cpp
+++ b/
src/lib/tvgShape.cpp
@@
-290,7
+290,7
@@
Result Shape::fill(unique_ptr<Fill> f) noexcept
auto p = f.release();
if (!p) return Result::MemoryCorruption;
- if (impl->fill) delete(impl->fill);
+ if (impl->fill
&& impl->fill != p
) delete(impl->fill);
impl->fill = p;
impl->flag |= RenderUpdateFlag::Gradient;