supermemo / SuperMemoAssistant

A companion app for SuperMemo 17-18 which extends its functionalities through plugins.
https://www.supermemo.wiki/sma/
MIT License
195 stars 20 forks source link

Setting element's html control text property to string.Empty causes a crash #231

Open bjsi opened 4 years ago

bjsi commented 4 years ago

Description

Setting the IControlHtml text property to string.Empty seems to cause a crash. Changing string.Empty to " " stopped the crashing.

Steps to Reproduce

    public static IControlHtml GetFirstHtmlCtrl()
    {
      var ctrlGroup = Svc.SM.UI.ElementWdw.ControlGroup;
      var htmlCtrl = ctrlGroup?.GetFirstHtmlControl()?.AsHtml();
      return htmlCtrl;
    }

    ...

    var htmlCtrl = GetFirstHtmlCtrl();
    htmlCtrl.Text = string.Empty;    

Environment (fill where applicable)