geforkt von Mirrors/Paper
Fix crash when version_history.json is empty (#9871)
Dieser Commit ist enthalten in:
Ursprung
22672b4be2
Commit
9db92731a1
@ -116,6 +116,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (currentData == null) {
|
||||
+ // Empty file
|
||||
+ currentData = new VersionData();
|
||||
+ currentData.setCurrentVersion(version);
|
||||
+ writeFile(path);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!version.equals(currentData.getCurrentVersion())) {
|
||||
+ // The version appears to have changed
|
||||
+ currentData.setOldVersion(currentData.getCurrentVersion());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren