[Cmake-commits] [cmake-commits] hoffman committed cmCTest.cxx 1.344 1.345

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Jan 9 12:56:11 EST 2009


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv30616

Modified Files:
	cmCTest.cxx 
Log Message:
ENH: fix crash for old style scripts


Index: cmCTest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmCTest.cxx,v
retrieving revision 1.344
retrieving revision 1.345
diff -C 2 -d -r1.344 -r1.345
*** cmCTest.cxx	9 Jan 2009 17:05:22 -0000	1.344
--- cmCTest.cxx	9 Jan 2009 17:56:09 -0000	1.345
***************
*** 1318,1323 ****
    cmCTestScriptHandler* ch = 
      static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
!   const char* subproject = 
!     ch->GetCMake()->GetProperty("SubProject", cmProperty::GLOBAL);
    if(subproject)
      { 
--- 1318,1329 ----
    cmCTestScriptHandler* ch = 
      static_cast<cmCTestScriptHandler*>(this->GetHandler("script"));
!   cmake* cm =  ch->GetCMake();
!   // if no CMake then this is the old style script and props like
!   // this will not work anyway.
!   if(!cm)
!     {
!     return;
!     }
!   const char* subproject = cm->GetProperty("SubProject", cmProperty::GLOBAL);
    if(subproject)
      { 



More information about the Cmake-commits mailing list