mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 10:33:44 +00:00
Iterator: Don't crash on calling get() before initialize()
This commit is contained in:
@@ -701,6 +701,10 @@ namespace IfcGeom {
|
|||||||
/// Gets the representation of the current geometrical entity.
|
/// Gets the representation of the current geometrical entity.
|
||||||
Element* get()
|
Element* get()
|
||||||
{
|
{
|
||||||
|
if (!initialization_outcome_) {
|
||||||
|
throw std::runtime_error("Iterator not initialized");
|
||||||
|
}
|
||||||
|
|
||||||
auto ret = *task_result_iterator_;
|
auto ret = *task_result_iterator_;
|
||||||
|
|
||||||
// If we want to organize the element considering their hierarchy
|
// If we want to organize the element considering their hierarchy
|
||||||
|
|||||||
Reference in New Issue
Block a user