From c935a9dbc11e5ac0bf8c23052d5cd473a0a8bcd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Tue, 15 Nov 2011 15:05:20 +0000 Subject: [PATCH] Fixed a crash when calling type() on an uninitialized Object --- STL_Extension/include/CGAL/Object.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/Object.h b/STL_Extension/include/CGAL/Object.h index dd88a8f577f..6cbf9de49d1 100644 --- a/STL_Extension/include/CGAL/Object.h +++ b/STL_Extension/include/CGAL/Object.h @@ -126,7 +126,10 @@ class Object const std::type_info & type() const { - return obj->type(); + if(obj) + return obj->type(); + else + return typeid(void); } #ifndef CGAL_NO_DEPRECATED_CODE