Skip to content
Snippets Groups Projects
Commit 2d596ee0 authored by Peter Bastian's avatar Peter Bastian
Browse files

better access check in devel mode

[[Imported from SVN: r972]]
parent 78defc2d
No related branches found
No related tags found
No related merge requests found
......@@ -82,8 +82,9 @@ namespace Dune {
row_type& operator[] (int i)
{
#ifdef DUNE_ISTL_WITH_CHECKING
if (!ready) DUNE_THROW(ISTLError,"row not initialized yet");
if (r==0) DUNE_THROW(ISTLError,"row not initialized yet");
if (i<0 || i>=n) DUNE_THROW(ISTLError,"index out of range");
if (r[i].getptr()==0) DUNE_THROW(ISTLError,"row not initialized yet");
#endif
return r[i];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment