Skip to content

Commit

Permalink
Fixed null reference exception when component is created.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnarimani committed Jul 17, 2018
1 parent 445fdfa commit 0d32cf1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Assets/RTLTMPro/RTLTextMeshPro.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ protected virtual void Update()

public virtual void UpdateText()
{
if(support == null)
support = new RTLSupport();

if (originalText == null)
originalText = "";

if (ForceFix == false && support.IsRTLInput(originalText) == false)
{
isRightToLeftText = false;
Expand Down

0 comments on commit 0d32cf1

Please sign in to comment.