Skip to content

Commit

Permalink
Fix crash when range is invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
gents83 committed Dec 2, 2023
1 parent 1823f8b commit 99c6445
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion naga/src/front/wgsl/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl ParseError {
self.labels
.iter()
.map(|label| {
Label::primary((), label.0.to_range().unwrap())
Label::primary((), label.0.to_range().unwrap_or_default())
.with_message(label.1.to_string())
})
.collect(),
Expand Down

0 comments on commit 99c6445

Please sign in to comment.