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(); final ReplayMetaData metaData = replayFile.getMetaData();
obj.consume(new Supplier<GuiReplayEntry>() { if (metaData != null) {
@Override obj.consume(() -> new GuiReplayEntry(file, metaData, theThumb));
public GuiReplayEntry get() { }
return new GuiReplayEntry(file, metaData, theThumb);
}
});
} catch (Exception e) { } catch (Exception e) {
FMLLog.getLogger().error("Could not load Replay File " + file.getName(), e); FMLLog.getLogger().error("Could not load Replay File " + file.getName(), e);
} }