changeset 1197:09c4a19098fa trunk

[svn] - lets avoid crashing shall we?
author nenolod
date Tue, 13 Jun 2006 23:15:31 -0700
parents ec7998847818
children 311c4a27c3dd
files ChangeLog Plugins/Input/console/Jma_File.cpp
diffstat 2 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Jun 13 22:16:47 2006 -0700
+++ b/ChangeLog	Tue Jun 13 23:15:31 2006 -0700
@@ -1,3 +1,14 @@
+2006-06-14 05:16:47 +0000  William Pitcock <nenolod@nenolod.net>
+  revision [1302]
+  - some JMA stuff
+  
+
+  Changes:        Modified:
+  +19 -3          trunk/Plugins/Input/console/Audacious_Driver.cpp  
+  +5 -3           trunk/Plugins/Input/console/Jma_File.cpp  
+  +2 -1           trunk/Plugins/Input/console/Jma_File.h  
+
+
 2006-06-14 04:23:52 +0000  William Pitcock <nenolod@nenolod.net>
   revision [1300]
   - Jma_File_Reader class
--- a/Plugins/Input/console/Jma_File.cpp	Tue Jun 13 22:16:47 2006 -0700
+++ b/Plugins/Input/console/Jma_File.cpp	Tue Jun 13 23:15:31 2006 -0700
@@ -30,6 +30,8 @@
 
 Jma_File_Reader::Jma_File_Reader()
 {
+	buf_ = NULL;
+	jma_ = NULL;
 }
 
 Jma_File_Reader::~Jma_File_Reader()
@@ -105,8 +107,11 @@
 
 void Jma_File_Reader::close()
 {
-	delete buf_;
-	delete jma_;
+	if (buf_ != NULL)
+		delete buf_;
+
+	if (jma_ != NULL)
+		delete jma_;
 
 	size_ = 0;
 	bufptr_ = NULL;