Skip to content

Commit

Permalink
Fix crash when createGeometry returns undefined.
Browse files Browse the repository at this point in the history
  • Loading branch information
josephbirkner committed Oct 24, 2024
1 parent 3e2f6e0 commit 997bd17
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libs/core/src/cesium-interface/primitive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ void CesiumPrimitive::addPolyLine(
if (synchronous_) {
polyline = JsValue(polylineClass->call("createGeometry", polyline));
}
addGeometryInstance(style, id, polyline, evalFun);
if (polyline.type() > JsValue::Type::Null) {
addGeometryInstance(style, id, polyline, evalFun);
}
}

void CesiumPrimitive::addPolygon(
Expand Down

0 comments on commit 997bd17

Please sign in to comment.