Fixed NullPointerException on updating preview
This commit is contained in:
parent
3e73ad4f46
commit
03800044cb
1 changed files with 5 additions and 3 deletions
|
@ -55,9 +55,11 @@ public class PreviewFragment extends Fragment implements MarkdownPreviewView {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updatePreview(String html) {
|
public void updatePreview(String html) {
|
||||||
markdownPreview.post(() -> {
|
if (markdownPreview != null) {
|
||||||
markdownPreview.loadDataWithBaseURL(null, html, "text/html", "UTF-8", null);
|
markdownPreview.post(() -> {
|
||||||
});
|
markdownPreview.loadDataWithBaseURL(null, html, "text/html", "UTF-8", null);
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue