Skip to content

Commit

Permalink
checking for mDataLoader not null
Browse files Browse the repository at this point in the history
Added check for mDataLoader not null
  • Loading branch information
nicolapapp committed Oct 12, 2021
1 parent 8b12b69 commit 95c6e89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ tools/*.jar
*.class
*.iml
.*.swp
*.clean
Original file line number Diff line number Diff line change
Expand Up @@ -2453,6 +2453,7 @@ public boolean isThisType(String file, boolean open) {
public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
throws FormatException, IOException
{
if(mDataLoader == null) return buf;
int theSeries = getSeries();
SlideBook7Reader.LOGGER.info("openBytes: theSeries: " + theSeries);
SlideBook7Reader.LOGGER.info("openBytes: no: " + no);
Expand Down Expand Up @@ -2505,6 +2506,7 @@ public byte[] openBytes(int no, byte[] buf, int x, int y, int w, int h)
// -- Internal FormatReader API methods --
public void close(boolean fileOnly) throws IOException {
super.close(fileOnly);
if(mDataLoader == null) return;
mDataLoader.CloseFile();
}

Expand All @@ -2513,6 +2515,7 @@ protected void initFile(String id) throws FormatException, IOException {
super.initFile(id);

try {
if(mDataLoader == null) return;
Boolean res;
res = mDataLoader.LoadMetadata();
if(!res)
Expand Down

0 comments on commit 95c6e89

Please sign in to comment.