Fixed crash of musrview in case the XML startup file is present but cannot be parsed correctly
This commit is contained in:
@@ -427,7 +427,7 @@ int PMsr2Data::ParseXmlStartupFile()
|
||||
status = fSaxParser->ParseFile(startup_path_name.c_str());
|
||||
// check for parse errors
|
||||
if (status) { // error
|
||||
cerr << endl << ">> msr2data: **WARNING** reading/parsing musrfit_startup.xml." << endl;
|
||||
cerr << endl << ">> msr2data: **WARNING** Reading/parsing musrfit_startup.xml failed." << endl;
|
||||
// clean up
|
||||
if (fSaxParser) {
|
||||
delete fSaxParser;
|
||||
|
||||
@@ -73,6 +73,24 @@ using namespace std;
|
||||
#define A2M_WKM 6
|
||||
#define A2M_ASCII 7
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Constructor
|
||||
//--------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>Constructor, reading the data histogramm files.
|
||||
*
|
||||
* \param msrInfo pointer to the msr-file handler
|
||||
*/
|
||||
PRunDataHandler::PRunDataHandler(PAny2ManyInfo *any2ManyInfo) : fAny2ManyInfo(any2ManyInfo)
|
||||
{
|
||||
fDataPath.clear();
|
||||
// read files
|
||||
if (!ReadWriteFilesList()) // couldn't read file
|
||||
fAllDataAvailable = false;
|
||||
else
|
||||
fAllDataAvailable = true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Constructor
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user