mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 02:39:23 +02:00
fixed possible NPE
This commit is contained in:
parent
b17910b344
commit
2d43e40af3
1 changed files with 3 additions and 3 deletions
|
@ -502,12 +502,12 @@ public final class FBView extends ZLTextView {
|
|||
return myReader.FooterHeightOption.getValue();
|
||||
}
|
||||
|
||||
public void resetTOCMarks() {
|
||||
public synchronized void resetTOCMarks() {
|
||||
myTOCMarks = null;
|
||||
}
|
||||
|
||||
private final int MAX_TOC_MARKS_NUMBER = 100;
|
||||
private void updateTOCMarks(BookModel model) {
|
||||
private synchronized void updateTOCMarks(BookModel model) {
|
||||
myTOCMarks = new ArrayList<TOCTree>();
|
||||
TOCTree toc = model.TOCTree;
|
||||
if (toc == null) {
|
||||
|
@ -535,7 +535,7 @@ public final class FBView extends ZLTextView {
|
|||
}
|
||||
}
|
||||
|
||||
public void paint(ZLPaintContext context) {
|
||||
public synchronized void paint(ZLPaintContext context) {
|
||||
final FBReaderApp reader = myReader;
|
||||
if (reader == null) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue