1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2024-09-29 06:50:50 +00:00

Page_sync: Do not fail if page doesn't exist

This commit is contained in:
gnosygnu 2016-11-15 15:00:41 -05:00
parent cba205baf3
commit ab209ef91e

View File

@ -43,6 +43,7 @@ public class Xowm_parse_wmf {
// get data // get data
Json_nde parse_nde = jdoc.Root_nde().Get_as_nde("parse"); Json_nde parse_nde = jdoc.Root_nde().Get_as_nde("parse");
if (parse_nde == null) return null; // handle pages that don't exist such as s.w:File:AnyFile.png; DATE:2016-11-15
int page_id = parse_nde.Get_as_int("pageid"); int page_id = parse_nde.Get_as_int("pageid");
int revn_id = parse_nde.Get_as_int("revid"); int revn_id = parse_nde.Get_as_int("revid");
byte[] page_ttl = Xoa_ttl.Replace_spaces(parse_nde.Get_as_bry("title")); byte[] page_ttl = Xoa_ttl.Replace_spaces(parse_nde.Get_as_bry("title"));