@@ -274,16 +274,28 @@ static bool GetFB3BookProperties(const char *name, LVStreamRef stream, BookPrope
274274 }
275275
276276 ldomNode * item = descDoc->nodeFromXPath (lString16 (" document-info" ));
277- lString16 created = item->getAttributeValue (" created" );
278- lString16 docprogram = item->getAttributeValue (" program-used" );
279- lString16 docauthor = item->getAttributeValue (" editor" );
280- lString16 docsrcurl = item->getAttributeValue (" src-url" );
281- lString16 docsrcocr = item->getAttributeValue (" ocr" );
277+ lString16 created = cs16 (" " );
278+ lString16 docprogram = cs16 (" " );
279+ lString16 docauthor = cs16 (" " );
280+ lString16 docsrcurl = cs16 (" " );
281+ lString16 docsrcocr = cs16 (" " );
282+ if (item) {
283+ created = item->getAttributeValue (" created" );
284+ docprogram = item->getAttributeValue (" program-used" );
285+ docauthor = item->getAttributeValue (" editor" );
286+ docsrcurl = item->getAttributeValue (" src-url" );
287+ docsrcocr = item->getAttributeValue (" ocr" );
288+ }
282289 lString16 series = descDoc->textFromXPath (lString16 (" fb3-description/sequence/title/main" ));
283290 ldomNode * item2 = descDoc->nodeFromXPath (lString16 (" paper-publish-info" ));
284- lString16 publisher = item2->getAttributeValue (" publisher" );
285- lString16 city = item2->getAttributeValue (" city" );
286- lString16 year = item2->getAttributeValue (" year" );
291+ lString16 publisher = cs16 (" " );
292+ lString16 city = cs16 (" " );
293+ lString16 year = cs16 (" " );
294+ if ( item2 ) {
295+ publisher = item2->getAttributeValue (" publisher" );
296+ city = item2->getAttributeValue (" city" );
297+ year = item2->getAttributeValue (" year" );
298+ }
287299 lString16 publisbn = descDoc->textFromXPath (lString16 (" paper-publish-info/isbn" ));
288300 lString16 publsequence = descDoc->textFromXPath (lString16 (" paper-publish-info/sequence" ));
289301
0 commit comments