SvgLoaderCommon: Add initialization in SvgVector

A segfault occurs when calling clear() a list without push.
This patch prevents it.
This commit is contained in:
JunsuChoi 2020-09-04 13:53:36 +09:00 committed by Hermet Park
parent 0d2982ff76
commit 6768e11eed

View file

@ -122,9 +122,9 @@ struct SvgStyleGradient;
template<class T> template<class T>
struct SvgVector struct SvgVector
{ {
T* list; T* list = nullptr;
uint32_t cnt; uint32_t cnt = 0;
uint32_t reserved; uint32_t reserved = 0;
void push(T element) void push(T element)
{ {