Changeset 8116 in josm


Ignore:
Timestamp:
2015-03-05T17:48:42+01:00 (9 years ago)
Author:
Don-vip
Message:

fix #11206 - NPE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/NotificationManager.java

    r7509 r8116  
    150150        public void actionPerformed(ActionEvent e) {
    151151            hideTimer.stop();
    152             currentNotificationPanel.setVisible(false);
    153             ((JFrame) Main.parent).getLayeredPane().remove(currentNotificationPanel);
    154             currentNotificationPanel = null;
     152            if (currentNotificationPanel != null) {
     153                currentNotificationPanel.setVisible(false);
     154                ((JFrame) Main.parent).getLayeredPane().remove(currentNotificationPanel);
     155                currentNotificationPanel = null;
     156            }
    155157            pauseTimer.restart();
    156158        }
     
    172174        @Override
    173175        public void actionPerformed(ActionEvent e) {
    174             currentNotificationPanel.setNotificationBackground(PANEL_SEMITRANSPARENT);
    175             currentNotificationPanel.repaint();
     176            if (currentNotificationPanel != null) {
     177                currentNotificationPanel.setNotificationBackground(PANEL_SEMITRANSPARENT);
     178                currentNotificationPanel.repaint();
     179            }
    176180            startHideTimer();
    177181        }
Note: See TracChangeset for help on using the changeset viewer.