diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-04-24 01:30:51 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-04-24 01:30:51 +0200 |
commit | 4fa3e2a7144c532af62520c9da53f423d6f002ca (patch) | |
tree | 22af01b94f28c7f6bd56e42d399b1c76887a2fc5 /api/logic/meta/Version.cpp | |
parent | d25a7ad3a627dfc15067adb1e2c178faafc5bd3e (diff) | |
download | MultiMC-4fa3e2a7144c532af62520c9da53f423d6f002ca.tar MultiMC-4fa3e2a7144c532af62520c9da53f423d6f002ca.tar.gz MultiMC-4fa3e2a7144c532af62520c9da53f423d6f002ca.tar.lz MultiMC-4fa3e2a7144c532af62520c9da53f423d6f002ca.tar.xz MultiMC-4fa3e2a7144c532af62520c9da53f423d6f002ca.zip |
GH-1856 Fix metadata version and list loading
Shouldn't crash anymore, shouldn't overwrite data in some bad way anymore either.
Diffstat (limited to 'api/logic/meta/Version.cpp')
-rw-r--r-- | api/logic/meta/Version.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/api/logic/meta/Version.cpp b/api/logic/meta/Version.cpp index 338e180b..b00a29e7 100644 --- a/api/logic/meta/Version.cpp +++ b/api/logic/meta/Version.cpp @@ -25,6 +25,10 @@ Meta::Version::Version(const QString &uid, const QString &version) { } +Meta::Version::~Version() +{ +} + QString Meta::Version::descriptor() { return m_version; @@ -76,8 +80,10 @@ void Meta::Version::merge(const std::shared_ptr<BaseEntity> &other) { setParentUid(version->m_parentUid); } - - setData(version->m_data); + if(version->m_data) + { + setData(version->m_data); + } } QString Meta::Version::localFilename() const |