forked from organicmaps/organicmaps
[ugc] loader crash fix
This commit is contained in:
parent
2f07c9d485
commit
44b0969ecb
2 changed files with 9 additions and 0 deletions
|
@ -21,6 +21,12 @@ UGC Loader::GetUGC(FeatureID const & featureId)
|
|||
if (!value.m_cont.IsExist(UGC_FILE_TAG))
|
||||
return {};
|
||||
|
||||
if (m_currentMwmId != featureId.m_mwmId)
|
||||
{
|
||||
m_currentMwmId = featureId.m_mwmId;
|
||||
m_d = binary::UGCDeserializer();
|
||||
}
|
||||
|
||||
auto readerPtr = value.m_cont.GetReader(UGC_FILE_TAG);
|
||||
|
||||
UGC ugc;
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
#include "ugc/binary/serdes.hpp"
|
||||
#include "ugc/types.hpp"
|
||||
|
||||
#include "indexer/mwm_set.hpp"
|
||||
|
||||
class Index;
|
||||
struct FeatureID;
|
||||
|
||||
|
@ -16,6 +18,7 @@ public:
|
|||
|
||||
private:
|
||||
Index const & m_index;
|
||||
MwmSet::MwmId m_currentMwmId;
|
||||
binary::UGCDeserializer m_d;
|
||||
};
|
||||
} // namespace ugc
|
||||
|
|
Loading…
Add table
Reference in a new issue