summaryrefslogtreecommitdiffstats
path: root/logic/minecraft/MojangVersionFormat.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'logic/minecraft/MojangVersionFormat.cpp')
-rw-r--r--logic/minecraft/MojangVersionFormat.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/logic/minecraft/MojangVersionFormat.cpp b/logic/minecraft/MojangVersionFormat.cpp
index 78447aa8..779a2b7d 100644
--- a/logic/minecraft/MojangVersionFormat.cpp
+++ b/logic/minecraft/MojangVersionFormat.cpp
@@ -232,8 +232,14 @@ void MojangVersionFormat::writeVersionProperties(const VersionFile* in, QJsonObj
writeString(out, "minecraftArguments", in->minecraftArguments);
writeString(out, "type", in->type);
writeString(out, "assets", in->assets);
- writeString(out, "releaseTime", timeToS3Time(in->m_releaseTime));
- writeString(out, "time", timeToS3Time(in->m_updateTime));
+ if(!in->m_releaseTime.isNull())
+ {
+ writeString(out, "releaseTime", timeToS3Time(in->m_releaseTime));
+ }
+ if(!in->m_updateTime.isNull())
+ {
+ writeString(out, "time", timeToS3Time(in->m_updateTime));
+ }
if(in->minimumLauncherVersion != -1)
{
out.insert("minimumLauncherVersion", in->minimumLauncherVersion);