Merge pull request #75 in SPIGOT/craftbukkit from ~XOR/craftbukkit:fixbookserial to master

* commit 'e8e3ca29e250f38be86e7c97f0bf03cec5374693':
  Add null check before iterating over iterator.
Dieser Commit ist enthalten in:
Thinkofdeath 2014-12-28 18:57:56 +01:00
Commit 08996835da

Datei anzeigen

@ -99,9 +99,11 @@ class CraftMetaBook extends CraftMetaItem implements BookMeta {
setTitle(SerializableMeta.getString(map, BOOK_TITLE.BUKKIT, true));
Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, BOOK_PAGES.BUKKIT, true);
for (Object page : pages) {
if (page instanceof String) {
addPage((String) page);
if(pages != null) {
for (Object page : pages) {
if (page instanceof String) {
addPage((String) page);
}
}
}