Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ the ASDF tree, as well as extract block data. Inline comments provide further e
// This reads the top-level core/asdf-1.0.0 schema
err = asdf_get_meta(file, "/", &meta);
if (err == ASDF_VALUE_OK) {
if (meta->history.entries[0]) {
// This is a NULL-terminated array of asdf_history_entry_t*
// `entries` is NULL when the file has no history, and otherwise a
// NULL-terminated array of asdf_history_entry_t*, so check both.
if (meta->history.entries && meta->history.entries[0]) {
printf("first history entry: %s\n", meta->history.entries[0]->description);
}
}
Expand Down