fix the crash
parent
12f184867e
commit
91af4b7476
|
@ -271,7 +271,7 @@ Ref<T> LazyDict<T>::Retrieve(unsigned int i)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unique ptr prevents memory leak in case of Read throws an exception
|
// Unique ptr prevents memory leak in case of Read throws an exception
|
||||||
auto inst = std::unique_ptr<T>();
|
auto inst = std::unique_ptr<T>(new T());
|
||||||
inst->id = std::string(mDictId) + "_" + to_string(i);
|
inst->id = std::string(mDictId) + "_" + to_string(i);
|
||||||
inst->oIndex = i;
|
inst->oIndex = i;
|
||||||
ReadMember(obj, "name", inst->name);
|
ReadMember(obj, "name", inst->name);
|
||||||
|
|
Loading…
Reference in New Issue