Skip to content
Snippets Groups Projects
Commit 294f306e authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

segfault in GetPar abfangen

parent 8dd74700
No related branches found
No related tags found
No related merge requests found
......@@ -295,6 +295,8 @@ void CFitting::GetPar(void)
NOlm::IterateC fiter;
NOlm::SelNew();
COlc *fin;
COld fout;
CScan S;
static CList parsel;
int maxpar = 0;
......@@ -308,22 +310,21 @@ void CFitting::GetPar(void)
while((fin=fiter())) {
uint nz = fin->ZCo.size();
bool savable = ( nz > 0 );
printf(" savable: %c\n", savable ? 'y' : 'n' );
for ( int iv=0; iv<parsel.V.size(); ++iv ) {
uint ip = parsel.V[iv];
if( ip>=fin->nPar() ) continue;
COld fout(fin);
CCoord zco = fin->ZCo.back();
fout.ZCo.pop_back();
fout.xco = zco;
fout.yco = fin->PCo[ip];
CScan S;
S.z = fin->VC[0].z;
S.z.pop_back();
if( savable ){
COld fout(fin);
CCoord zco = fin->ZCo.back();
fout.ZCo.pop_back();
fout.xco = zco;
fout.yco = fin->PCo[ip];
S.Clear();
S.z = fin->VC[0].z;
S.z.pop_back();
}
for (uint j=0; j<fin->nScan(); j++) {
if (!savable) {
printf( "par%2d of scan%d has value %12g\n",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment