Update of /cvsroot/audacity/audacity-src/src/effects
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv15687/effects

Modified Files:
        Contrast.cpp Contrast.h 
Log Message:

Fix uninitialized reference and keep Audacity from hanging at quit by
deleting the dialog.


Index: Contrast.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Contrast.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Contrast.cpp        22 Mar 2009 01:57:17 -0000      1.25
+++ Contrast.cpp        25 May 2009 17:51:56 -0000      1.26
@@ -50,7 +50,7 @@
 
 #include "../PlatformCompatibility.h"
 
-ContrastDialog *gContrastDialog = NULL;
+static ContrastDialog *gContrastDialog = NULL;
 
 void InitContrastDialog(wxWindow * parent)
 {
@@ -121,6 +121,14 @@
    }
 }
 
+void CloseContrastDialog()
+{
+   if (gContrastDialog) {
+      delete gContrastDialog;
+      gContrastDialog = NULL;
+   }
+}
+
 float ContrastDialog::GetDB()
 {
 //   not good
@@ -244,6 +252,9 @@
   wxDialog(parent, id, title, pos, wxDefaultSize,
      wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxMAXIMIZE_BOX )
 {
+   foregrounddB = 1234.0;
+   backgrounddB = 1234.0;
+
    // NULL out the control members until the controls are created.
    m_pButton_GetForeground = NULL;
    m_pButton_GetBackground = NULL;

Index: Contrast.h
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/effects/Contrast.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Contrast.h  22 Mar 2009 01:57:17 -0000      1.15
+++ Contrast.h  25 May 2009 17:51:56 -0000      1.16
@@ -21,11 +21,8 @@
 class Envelope;
 class WaveTrack;
 
-class ContrastDialog;
-
-extern ContrastDialog *gContrastDialog;
-
 void InitContrastDialog(wxWindow * parent);
+void CloseContrastDialog();
 
 //----------------------------------------------------------------------------
 // ContrastDialog


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to