Changeset 7229


Ignore:
Timestamp:
11/22/10 10:35:11 (10 years ago)
Author:
melissa
Message:

Prevent NPEs if detector metadata is missing.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/FV1000Reader.java

    r7103 r7229  
    472472      while (guiChannel != null) { 
    473473        ChannelData channel = new ChannelData(); 
    474         channel.gain = new Double(guiChannel.get("AnalogPMTGain")); 
    475         channel.voltage = new Double(guiChannel.get("AnalogPMTVoltage")); 
     474        String gain = guiChannel.get("AnalogPMTGain"); 
     475        if (gain != null) channel.gain = new Double(gain); 
     476        String voltage = guiChannel.get("AnalogPMTVoltage"); 
     477        if (voltage != null) channel.voltage = new Double(voltage); 
    476478        channel.barrierFilter = guiChannel.get("BF Name"); 
    477479        channel.active = Integer.parseInt(guiChannel.get("CH Activate")) != 0; 
  • trunk/components/bio-formats/src/loci/formats/in/FV1000Reader.java

    r7089 r7229  
    472472      while (guiChannel != null) { 
    473473        ChannelData channel = new ChannelData(); 
    474         channel.gain = new Double(guiChannel.get("AnalogPMTGain")); 
    475         channel.voltage = new Double(guiChannel.get("AnalogPMTVoltage")); 
     474        String gain = guiChannel.get("AnalogPMTGain"); 
     475        if (gain != null) channel.gain = new Double(gain); 
     476        String voltage = guiChannel.get("AnalogPMTVoltage"); 
     477        if (voltage != null) channel.voltage = new Double(voltage); 
    476478        channel.barrierFilter = guiChannel.get("BF Name"); 
    477479        channel.active = Integer.parseInt(guiChannel.get("CH Activate")) != 0; 
Note: See TracChangeset for help on using the changeset viewer.