Merge change 5810 into donut

* changes:
  Fix bug 1930055 of NullPointerException.