mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 15:17:29 +00:00
Fix CI failure
This commit is contained in:
parent
8b030125a3
commit
2e069242e9
@ -970,9 +970,6 @@ QPDF::calculateLinearizationData(std::map<int, int> const& object_stream_data)
|
|||||||
if (m->object_to_obj_users.empty()) {
|
if (m->object_to_obj_users.empty()) {
|
||||||
// Note that we can't call optimize here because we don't know whether it should be called
|
// Note that we can't call optimize here because we don't know whether it should be called
|
||||||
// with or without allow changes.
|
// with or without allow changes.
|
||||||
if (getRoot().getKeyIfDict("/Pages").isNull()) {
|
|
||||||
stopOnError("no /Pages found while calculating linearization data");
|
|
||||||
}
|
|
||||||
throw std::logic_error(
|
throw std::logic_error(
|
||||||
"INTERNAL ERROR: QPDF::calculateLinearizationData called before optimize()");
|
"INTERNAL ERROR: QPDF::calculateLinearizationData called before optimize()");
|
||||||
}
|
}
|
||||||
|
@ -113,6 +113,11 @@ QPDF::optimize(
|
|||||||
}
|
}
|
||||||
|
|
||||||
filterCompressedObjects(object_stream_data);
|
filterCompressedObjects(object_stream_data);
|
||||||
|
|
||||||
|
if (m->obj_user_to_objects.empty()) {
|
||||||
|
stopOnError("no objects found while trying to optimize");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -376,6 +381,6 @@ QPDF::filterCompressedObjects(std::map<int, int> const& object_stream_data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m->obj_user_to_objects = t_obj_user_to_objects;
|
m->obj_user_to_objects.swap(t_obj_user_to_objects);
|
||||||
m->object_to_obj_users = t_object_to_obj_users;
|
m->object_to_obj_users.swap(t_object_to_obj_users);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user