From 94eefd46d19bd3b8bf50c2592f2fa6a116bb61f8 Mon Sep 17 00:00:00 2001 From: "Reece H. Dunn" Date: Sun, 4 Oct 2015 13:44:58 +0100 Subject: [PATCH] Delete spectseq on error conditions. --- src/spectdisplay.cpp | 1 + src/spectseq.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/spectdisplay.cpp b/src/spectdisplay.cpp index 5b25293b..77161cf1 100644 --- a/src/spectdisplay.cpp +++ b/src/spectdisplay.cpp @@ -993,6 +993,7 @@ void MyFrame::OnNewWindow(wxCommandEvent& event) if(stream.Ok() == FALSE) { wxLogError(_T("Failed to open '%s'"),filename.c_str()); + delete spectseq; return; } wxFileName path = wxFileName(filename); diff --git a/src/spectseq.cpp b/src/spectseq.cpp index c84fab24..d00a0cd1 100644 --- a/src/spectseq.cpp +++ b/src/spectseq.cpp @@ -1,7 +1,7 @@ /*************************************************************************** * Copyright (C) 2005 to 2007 by Jonathan Duddington * * email: jonsd@users.sourceforge.net * - * Copyright (C) 2013 Reece H. Dunn * + * Copyright (C) 2013-2015 Reece H. Dunn * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by *