error: src/structs/vml/image_data.rs line 43, Error unwrapping a None value
wellitecho opened this issue · comments
wellitecho commented
version: V 1.1.1
relevant code
original code here:
if let Some(relid) = get_attribute(e, b"o:relid") {
let relationship = drawing_relationships
.unwrap() // here, should only unwrap if it is Some(T)
.get_relationship_by_rid(&relid);
self.image_name
.set_value_string(relationship.get_raw_file().get_file_name());
}
fix:
if let Some(relid) = get_attribute(e, b"o:relid") {
// relevant change
if let Some(rel) = drawing_relationships {
let relationship = rel.get_relationship_by_rid(&relid);
self.image_name
.set_value_string(relationship.get_raw_file().get_file_name());
}
}
MathNya commented
@wellitecho
Thank you for contacting us.
We will investigate and make the necessary changes.