From f88f225466d052c3b1d3e10df65b9be886023be0 Mon Sep 17 00:00:00 2001 From: Guido Kanschat Date: Sun, 11 Sep 2016 17:12:13 +0200 Subject: [PATCH] do not throw exception in AnyData::try_read_ptr() even if different type --- include/deal.II/algorithms/any_data.h | 2 ++ 1 file changed, 2 insertions(+) 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; } -- 2.39.5