ReplayMod / ReplayStudio

Library for handling Minecraft Replay Files (.mcpr files)
GNU Lesser General Public License v3.0
44 stars 14 forks source link

Fix crash on empty markers file #17

Open Kepler-17c opened 1 year ago

Kepler-17c commented 1 year ago

The current implementation assumes that Gson always returns a valid JsonArray instance. But in the case of an empty file, the result is null, which crashes the game with an NPE. This PR simply adds a null-check to return an empty result as if the file wasn't present.