Fixed NullPointerException on updating preview

This commit is contained in:
William Brawner 2017-08-30 17:59:34 -06:00 committed by William Brawner
parent 3e73ad4f46
commit 03800044cb

View file

@ -55,10 +55,12 @@ public class PreviewFragment extends Fragment implements MarkdownPreviewView {
@Override
public void updatePreview(String html) {
if (markdownPreview != null) {
markdownPreview.post(() -> {
markdownPreview.loadDataWithBaseURL(null, html, "text/html", "UTF-8", null);
});
}
}
@Override
public void onResume() {