From: Guido Kanschat Date: Sun, 11 Sep 2016 15:12:13 +0000 (+0200) Subject: do not throw exception in AnyData::try_read_ptr() even if different type X-Git-Tag: v8.5.0-rc1~681^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f88f225466d052c3b1d3e10df65b9be886023be0;p=dealii.git do not throw exception in AnyData::try_read_ptr() even if different type --- diff --git a/include/deal.II/algorithms/any_data.h b/include/deal.II/algorithms/any_data.h index 93ca7b2eda..05153daf1e 100644 --- a/include/deal.II/algorithms/any_data.h +++ b/include/deal.II/algorithms/any_data.h @@ -275,6 +275,8 @@ AnyData::try_read_ptr(const unsigned int i) const const type *const *p = boost::any_cast(&data[i]); if (p==0) p = boost::any_cast(&data[i]); + if (p==0) + return 0; return *p; }