Fix NPE in text descriptor
Summary: Apparantly this can be null, we have received traversal errors with this in the stacktrace Reviewed By: adityasharat Differential Revision: D50839760 fbshipit-source-id: 8e43f35b2adfa91358924b1e162c53c50b0d855d
This commit is contained in:
committed by
Facebook GitHub Bot
parent
620b41b691
commit
9f78eb3f00
@@ -31,7 +31,8 @@ object TextDrawableDescriptor : ChainedDescriptor<TextDrawable>() {
|
|||||||
attributeSections: MutableMap<MetadataId, InspectableObject>
|
attributeSections: MutableMap<MetadataId, InspectableObject>
|
||||||
) {
|
) {
|
||||||
val props =
|
val props =
|
||||||
mapOf<Int, Inspectable>(TextAttributeId to InspectableValue.Text(node.text.toString()))
|
mapOf<Int, Inspectable>(
|
||||||
|
TextAttributeId to InspectableValue.Text(node.text?.toString() ?: "null"))
|
||||||
|
|
||||||
attributeSections[SectionId] = InspectableObject(props)
|
attributeSections[SectionId] = InspectableObject(props)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user