1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-16 19:26:36 +01:00

Fixes per Vigilant Sentry (http://www.vigilantsw.com/)

* Fix memory leaks.

* Add comments about initializations and checking for successful results.

* Add checks for NULL deref.

* Consistency in "TODO" vs "TO-DO" comments!
This commit is contained in:
v.audacity
2012-02-08 05:09:14 +00:00
parent 5b3f3f71ea
commit 5f5b9778de
23 changed files with 83 additions and 34 deletions

View File

@@ -742,7 +742,8 @@ void ControlToolBar::StopPlaying(bool stopStream /* = true*/)
void ControlToolBar::OnBatch(wxCommandEvent &evt)
{
AudacityProject *proj = GetActiveProject();
proj->OnApplyChain();
if (proj)
proj->OnApplyChain();
mPlay->Enable();
mStop->Enable();
@@ -762,8 +763,7 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
AudacityProject *p = GetActiveProject();
if (p && p->GetCleanSpeechMode()) {
size_t numProjects = gAudacityProjects.Count();
bool tracks = (p && !p->GetTracks()->IsEmpty());
if (tracks || (numProjects > 1)) {
if (!p->GetTracks()->IsEmpty() || (numProjects > 1)) {
wxMessageBox(_("Recording in CleanSpeech mode is not possible when a track, or more than one project, is already open."),
_("Recording not permitted"),
wxOK | wxICON_INFORMATION,
@@ -817,7 +817,6 @@ void ControlToolBar::OnRecord(wxCommandEvent &evt)
int recordingChannels = 0;
bool shifted = mRecord->WasShiftDown();
if (shifted) {
TrackListIterator it(t);
WaveTrack *wt;
bool sel = false;
double allt0 = t0;