Fix GuiReplayViewer crashing when metadata of replay is missing

This commit is contained in:
johni0702
2016-07-29 14:04:05 +02:00
parent 372521f319
commit eedaf75e9e

View File

@@ -86,12 +86,9 @@ public class GuiReplayViewer extends GuiScreen {
}
final ReplayMetaData metaData = replayFile.getMetaData();
obj.consume(new Supplier<GuiReplayEntry>() {
@Override
public GuiReplayEntry get() {
return new GuiReplayEntry(file, metaData, theThumb);
}
});
if (metaData != null) {
obj.consume(() -> new GuiReplayEntry(file, metaData, theThumb));
}
} catch (Exception e) {
FMLLog.getLogger().error("Could not load Replay File " + file.getName(), e);
}