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

Modified Files:
        BatchCommands.cpp 
Log Message:
Add NULL check since GetActiveProject can return NULL

Index: BatchCommands.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/BatchCommands.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- BatchCommands.cpp   7 Aug 2009 15:32:56 -0000       1.38
+++ BatchCommands.cpp   10 Nov 2009 00:03:49 -0000      1.39
@@ -596,9 +596,11 @@
 
    if (!res)
    {
-      // Chain failed or was cancelled; revert to the previous state
-      UndoManager *um = proj->GetUndoManager();
-      proj->SetStateTo(um->GetCurrentState());
+      if(proj) {
+         // Chain failed or was cancelled; revert to the previous state
+         UndoManager *um = proj->GetUndoManager();
+         proj->SetStateTo(um->GetCurrentState());
+      }
       return false;
    }
 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Audacity-cvs mailing list
Audacity-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to