Add a null protection for getContext() when updating preview in theme/grid fragment.

They call getContext() in a callback, so it's possible that getContext() is called after the fragment is finished.
At this moment, the getContext() will return null.

Bug: 157624922
Change-Id: Id18b721ccd32a82d1c1925128829fbcd00a45b88
2 files changed