avm2: inner_class_definition is not an Option

This commit is contained in:
Adrian Wielgosik 2021-09-18 13:24:02 +02:00 committed by Adrian Wielgosik
parent 3e1764aa1e
commit 4b7f8b3dbd
2 changed files with 3 additions and 3 deletions

View File

@ -1091,7 +1091,7 @@ pub trait TObject<'gc>: 'gc + Collect + Debug + Into<Object<'gc>> + Clone + Copy
None => return None,
}
};
class.inner_class_definition()
Some(class.inner_class_definition())
}
/// Get this object's class object, if it has one - unless it's a class itself.

View File

@ -344,8 +344,8 @@ impl<'gc> ClassObject<'gc> {
Ok(())
}
pub fn inner_class_definition(self) -> Option<GcCell<'gc, Class<'gc>>> {
Some(self.0.read().class)
pub fn inner_class_definition(self) -> GcCell<'gc, Class<'gc>> {
self.0.read().class
}
pub fn interfaces(self) -> Vec<Object<'gc>> {