From: <ch...@us...> - 2009-03-23 20:11:47
|
Revision: 743 http://proteowizard.svn.sourceforge.net/proteowizard/?rev=743&view=rev Author: chambm Date: 2009-03-23 20:11:42 +0000 (Mon, 23 Mar 2009) Log Message: ----------- - fixed crashes on RAW files with empty controllers Modified Paths: -------------- trunk/pwiz/pwiz/data/vendor_readers/ChromatogramList_Thermo.cpp trunk/pwiz/pwiz/data/vendor_readers/Reader_Thermo.cpp Modified: trunk/pwiz/pwiz/data/vendor_readers/ChromatogramList_Thermo.cpp =================================================================== --- trunk/pwiz/pwiz/data/vendor_readers/ChromatogramList_Thermo.cpp 2009-03-20 15:15:33 UTC (rev 742) +++ trunk/pwiz/pwiz/data/vendor_readers/ChromatogramList_Thermo.cpp 2009-03-23 20:11:42 UTC (rev 743) @@ -191,6 +191,11 @@ { rawfile_->setCurrentController((ControllerType) controllerType, n); + // skip this controller if it has no spectra + if (rawfile_->value(NumSpectra) == 0) + continue; + + switch ((ControllerType) controllerType) { case Controller_MS: Modified: trunk/pwiz/pwiz/data/vendor_readers/Reader_Thermo.cpp =================================================================== --- trunk/pwiz/pwiz/data/vendor_readers/Reader_Thermo.cpp 2009-03-20 15:15:33 UTC (rev 742) +++ trunk/pwiz/pwiz/data/vendor_readers/Reader_Thermo.cpp 2009-03-23 20:11:42 UTC (rev 743) @@ -176,6 +176,7 @@ { msd.cvs = defaultCVList(); + rawfile.setCurrentController(Controller_MS, 1); msd.fileDescription.fileContent.set(translateAsSpectrumType(rawfile.getScanInfo(1)->scanType())); SourceFilePtr sourceFile(new SourceFile); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |