Commit 908a4fe0 by Francois Gygi

fixed error checking

git-svn-id: http://qboxcode.org/svn/qb/trunk@1141 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 6461979a
......@@ -39,7 +39,7 @@ class Dspin : public Var
if ( argc != 2 )
{
if ( ui->onpe0() )
cout << " delta_spin takes only one value" << endl;
cout << " delta_spin takes only one value" << endl;
return 1;
}
......@@ -51,6 +51,13 @@ class Dspin : public Var
return 1;
}
if ( s->wf.nspin() < 2 )
{
if ( ui->onpe0() )
cout << " Cannot set delta_spin: nspin == 1" << endl;
return 1;
}
s->wf.set_deltaspin(v);
return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment