Skip to content

Commit 0d32cf1

Browse files
committed
Fixed null reference exception when component is created.
1 parent 445fdfa commit 0d32cf1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Assets/RTLTMPro/RTLTextMeshPro.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ protected virtual void Update()
109109

110110
public virtual void UpdateText()
111111
{
112+
if(support == null)
113+
support = new RTLSupport();
114+
115+
if (originalText == null)
116+
originalText = "";
117+
112118
if (ForceFix == false && support.IsRTLInput(originalText) == false)
113119
{
114120
isRightToLeftText = false;

0 commit comments

Comments
 (0)