Skip to content

Commit

Permalink
Fix crash when iterating into unpaired flip pairings (#345)
Browse files Browse the repository at this point in the history
* Fix crash when copying into unpaired flip pairings

* Fix typo in Paste Horizontal Flip
  • Loading branch information
grillo-delmal committed May 3, 2024
1 parent 45c43a3 commit 322353e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/creator/panels/parameters.d
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ void incParameterView(bool armedParam=false)(size_t idx, Parameter param, string
pasteParameter(param, 2);
incViewportNodeDeformNotifyParamValueChanged();
}
if (igMenuItem(__("Paste and Horiontal Flip"), "", false, true)) {
if (igMenuItem(__("Paste and Horizontal Flip"), "", false, true)) {
pasteParameter(param, 0);
incViewportNodeDeformNotifyParamValueChanged();
}
Expand Down
2 changes: 1 addition & 1 deletion source/creator/windows/flipconfig.d
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ FlipPair[] incGetFlipPairs() {

FlipPair incGetFlipPairFor(Node node) {
foreach (pair; flipPairs) {
if (pair.parts[0].uuid == node.uuid || pair.parts[1].uuid == node.uuid) {
if (pair.parts[1] !is null && (pair.parts[0].uuid == node.uuid || pair.parts[1].uuid == node.uuid)) {
return pair;
}
}
Expand Down

0 comments on commit 322353e

Please sign in to comment.