Changeset 140 in tmcsimulator-scriptbuilder for trunk/src/event/editor/AudioPanel.java


Ignore:
Timestamp:
12/22/2017 02:05:13 PM (8 years ago)
Author:
bmcguffin
Message:

Fixed defect #67. Removing an event and then closing the event editor window no longer causes the program to hang; a null check for the event is encountered before taking action upon close of the window.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/event/editor/AudioPanel.java

    r130 r140  
    5050    public void uponClose() 
    5151    { 
    52         event.audioPath = audioFileText.getText(); 
    53         try 
     52        if (event != null) 
    5453        { 
    55             event.audioLength = Integer.parseInt(audioLengthText.getText()); 
    56         } 
    57         catch (Exception ex) 
    58         { 
     54            event.audioPath = audioFileText.getText(); 
     55            try 
     56            { 
     57                event.audioLength = Integer.parseInt(audioLengthText.getText()); 
     58            } 
     59            catch (Exception ex) 
     60            { 
    5961 
     62            } 
    6063        } 
    6164    } 
Note: See TracChangeset for help on using the changeset viewer.