From 568ceeb47f34b0a46f74f9c52f215c0c28c4a2d9 Mon Sep 17 00:00:00 2001 From: "v.audacity" Date: Fri, 13 Dec 2013 01:15:12 +0000 Subject: [PATCH] bug fix patch from Eric Lubin: "...where a check accidentally does not dereference a pointer to a bool, instead checking whether or not the pointer is non-null." from "Fixed bug in Project.cpp Where Bool Isn't Dereferenced Properly" thread on -devel. --- src/Project.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Project.cpp b/src/Project.cpp index ac2c0595a..07b97d0a0 100644 --- a/src/Project.cpp +++ b/src/Project.cpp @@ -588,13 +588,13 @@ void GetNextWindowPlacement(wxRect *nextRect, bool *pMaximized, bool *pIconized) GetDefaultWindowRect(&defaultWindowRect); if (gAudacityProjects.IsEmpty()) { - //Read the values from the registry, or use the defaults + // Read the values from the registry, or use the defaults. // In version 1.3 and above, using the registry has been replaced - // by a configuration file -- audacity.cfg. Different OSes store - // this file in different locations. + // by a configuration file -- audacity.cfg. Different OSes store + // this file in different locations. gPrefs->Read(wxT("/Window/Maximized"), pMaximized); gPrefs->Read(wxT("/Window/Iconized"), pIconized); - if (pMaximized || pIconized) { + if (*pMaximized || *pIconized) { nextRect->SetX(gPrefs->Read(wxT("/Window/Normal_X"), defaultWindowRect.GetX())); nextRect->SetY(gPrefs->Read(wxT("/Window/Normal_Y"), defaultWindowRect.GetY())); nextRect->SetWidth(gPrefs->Read(wxT("/Window/Normal_Width"), defaultWindowRect.GetWidth()));