mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-24 15:19:06 +00:00
SvgLoaderCommon: Add initialization in SvgVector
A segfault occurs when calling clear() a list without push. This patch prevents it.
This commit is contained in:
parent
0d2982ff76
commit
6768e11eed
1 changed files with 3 additions and 3 deletions
|
@ -122,9 +122,9 @@ struct SvgStyleGradient;
|
|||
template<class T>
|
||||
struct SvgVector
|
||||
{
|
||||
T* list;
|
||||
uint32_t cnt;
|
||||
uint32_t reserved;
|
||||
T* list = nullptr;
|
||||
uint32_t cnt = 0;
|
||||
uint32_t reserved = 0;
|
||||
|
||||
void push(T element)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue