Skip to content

Commit

Permalink
minor - guard divide by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremylt committed Feb 3, 2025
1 parent a0c3296 commit c0d1743
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion interface/ceed-operator.c
Original file line number Diff line number Diff line change
Expand Up @@ -1719,8 +1719,9 @@ int CeedOperatorGetFlopsEstimate(CeedOperator op, CeedSize *flops) {
CeedQFunctionField *qf_input_fields, *qf_output_fields;
CeedOperatorField *op_input_fields, *op_output_fields;

CeedCall(CeedOperatorIsAtPoints(op, &is_at_points));
CeedCall(CeedOperatorGetNumElements(op, &num_elem));
if (num_elem == 0) return CEED_ERROR_SUCCESS
CeedCall(CeedOperatorIsAtPoints(op, &is_at_points));
if (is_at_points) {
CeedMemType mem_type;
CeedElemRestriction rstr_points = NULL;
Expand Down

0 comments on commit c0d1743

Please sign in to comment.