Skip to content

Commit

Permalink
Fix minor issue
Browse files Browse the repository at this point in the history
  • Loading branch information
adelhpour committed Oct 30, 2024
1 parent 90d7b43 commit 720f86c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libsbmlnetwork_sbmldocument_render.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "libsbmlnetwork_layout.h"
#include "libsbmlnetwork_render.h"
#include "libsbmlnetwork_render_helpers.h"
#include "libsbmlnetwork_layout_helpers.h"
#include "libsbmlnetwork_sbmldocument_helpers.h"
#include "styles/libsbmlnetwork_styles.h"

Expand Down Expand Up @@ -4135,15 +4136,15 @@ const double getLineEndingStrokeWidth(SBMLDocument* document, unsigned int layou
for (unsigned int renderIndex = 0; renderIndex < getNumLocalRenderInformation(document, layoutIndex); renderIndex++) {
for (unsigned int lineEndingIndex = 0; lineEndingIndex < getNumLineEndings(getLocalRenderInformation(document, layoutIndex, renderIndex)); lineEndingIndex++) {
double strokeWidth = getLineEndingStrokeWidth(document, renderIndex, getLineEnding(getLocalRenderInformation(document, layoutIndex, renderIndex), lineEndingIndex)->getId());
if (!std::isnan(strokeWidth))
if (isValidDoubleValue(document, strokeWidth))
lineEndingStrokeWidths.push_back(strokeWidth);
}
}
if (layoutIndex == 0) {
for (unsigned int renderIndex = 0; renderIndex < getNumGlobalRenderInformation(document); renderIndex++) {
for (unsigned int lineEndingIndex = 0; lineEndingIndex < getNumLineEndings(getGlobalRenderInformation(document, renderIndex)); lineEndingIndex++) {
double strokeWidth = getLineEndingStrokeWidth(document, renderIndex, getLineEnding(getGlobalRenderInformation(document, renderIndex), lineEndingIndex)->getId());
if (!std::isnan(strokeWidth))
if (isValidDoubleValue(document, strokeWidth))
lineEndingStrokeWidths.push_back(strokeWidth);
}
}
Expand Down

0 comments on commit 720f86c

Please sign in to comment.