Changeset 3179


Ignore:
Timestamp:
09/19/07 12:56:39 (12 years ago)
Author:
melissa
Message:

Fixed close() bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/LegacyQTReader.java

    r3175 r3179  
    8787      throw new FormatException("Invalid image number: " + no); 
    8888    } 
    89  
    90     if (tools.isQTExpired()) { 
    91       throw new FormatException(LegacyQTTools.EXPIRED_QT_MSG); 
    92     } 
    93     if (!tools.canDoQT()) throw new FormatException(LegacyQTTools.NO_QT_MSG); 
    94  
    9589    // paint frame into image 
    9690    try { 
     
    10397      throw new FormatException("Open movie failed", re); 
    10498    } 
    105  
    10699    return ImageTools.makeBuffered(image); 
    107100  } 
     
    110103  public void close(boolean fileOnly) throws IOException { 
    111104    try { 
    112       r.exec("openMovieFile.close()"); 
    113       if (!fileOnly) { 
    114         r.exec("m.disposeQTObject()"); 
    115         r.exec("imageTrack.disposeQTObject()"); 
    116         r.exec("QTSession.close()"); 
     105      if (r.getVar("openMovieFile") != null) { 
     106        r.exec("openMovieFile.close()"); 
     107        if (!fileOnly) { 
     108          r.exec("m.disposeQTObject()"); 
     109          r.exec("imageTrack.disposeQTObject()"); 
     110          r.exec("QTSession.close()"); 
     111        } 
    117112      } 
    118113    } 
Note: See TracChangeset for help on using the changeset viewer.