[Tizen] Add null check for mTextureSet. 30/244230/1 accepted/tizen/unified/20200917.030617 submit/tizen/20200916.173718
authorJoogab Yun <joogab.yun@samsung.com>
Wed, 16 Sep 2020 06:22:08 +0000 (15:22 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Wed, 16 Sep 2020 07:03:04 +0000 (16:03 +0900)
commitdcd9007d49dac8cc4c4a8f3d2ea5a0a5bea3fa6a
treeac93c67f891d328fd8f91333cfa6480f3a5db022
parent4036d3983f42718568661a2059c272b342397c1f
[Tizen] Add null check for mTextureSet.
For empty text, text-visual doesn't create a textureSet.
So it happens that mTextureSet is null.

(sample)

 void Create(Application& application)
  {
    // Get a handle to the window
    Window window = application.GetWindow();
    window.SetBackgroundColor(Color::WHITE);

    textLabel = TextLabel::New();
    textLabel.SetProperty( Actor::Property::SIZE, Vector2(300.f, 200.f));
    textLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, ""  );
    textLabel.SetProperty( Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL, true  );

    window.Add(textLabel);

    // Respond to a touch anywhere on the window
    window.GetRootLayer().TouchedSignal().Connect(this, &HelloWorldController::OnTouch);

  }

  bool OnTouch(Actor actor, const TouchEvent& touch)
  {
    textLabel.SetProperty( Toolkit::TextLabel::Property::TEXT, ""  );
    textLabel.SetProperty( Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL, false  );
    return true;
  }

Change-Id: Iff50abb0278c7d2f650a8c92cf8d5c5eaec6f36a
dali-toolkit/internal/text/text-scroller.cpp [changed mode: 0644->0755]