This commit is contained in:
Sergey Kozyrev 2023-11-15 14:23:41 +04:00
parent e2ad2fda8d
commit 141994f533

View File

@ -50,7 +50,7 @@ class CollectionFrame extends JComponent {
{
if (JOptionPane.showConfirmDialog(null, "Delete Tanker?", "Delete", JOptionPane.YES_NO_OPTION) == JOptionPane.OK_OPTION)
{
if (_tanks.minus(Integer.parseInt(text)))
if (_tanks.minus(Integer.parseInt(text)) != null)
{
JOptionPane.showMessageDialog(null, "Объект удален", "Информация", JOptionPane.INFORMATION_MESSAGE);
super.repaint();