Changeset 140 in tmcsimulator-scriptbuilder for trunk/src/event/editor/WitnessPanel.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/WitnessPanel.java

    r130 r140  
    6464    public void uponClose() 
    6565    { 
    66         event.witnessName = txtFirstName.getText() + " " + txtLastName.getText(); 
    67         event.witnessNum = txtPhoneNumber.getText(); 
    68         event.witnessAddress = txtAddress.getText(); 
     66        if (event != null) 
     67        { 
     68            event.witnessName = txtFirstName.getText() + " " + txtLastName.getText(); 
     69            event.witnessNum = txtPhoneNumber.getText(); 
     70            event.witnessAddress = txtAddress.getText(); 
     71        } 
    6972    } 
    7073 
Note: See TracChangeset for help on using the changeset viewer.