aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBradley Lewis <22850972+BradLewis@users.noreply.github.com>2025-08-13 17:33:13 -0400
committerGitHub <noreply@github.com>2025-08-13 17:33:13 -0400
commitd7761dc6f842d15496cbf746ce90cb84b3bf5b37 (patch)
tree0ce5a83f55031aba13884929db0570a9e6b16a63 /src
parent8c79828ef714d0219cf2585d33a4425cd6cb5370 (diff)
parentf51696d0c3e6b3af6910bae05fc08b8f1c1c5a67 (diff)
Merge pull request #876 from thetarnav/fix-crash-on-nil-arg-type
Fix crash on accessing nil arg type pointer
Diffstat (limited to 'src')
-rw-r--r--src/server/symbol.odin6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/symbol.odin b/src/server/symbol.odin
index 8fcf89c..26c48aa 100644
--- a/src/server/symbol.odin
+++ b/src/server/symbol.odin
@@ -567,8 +567,10 @@ get_proc_arg_type_from_index :: proc(value: SymbolProcedureValue, parameter_inde
index := 0
for arg in value.arg_types {
// We're in a variadic arg, so return true
- if _, ok := arg.type.derived.(^ast.Ellipsis); ok {
- return arg, true
+ if arg.type != nil {
+ if _, ok := arg.type.derived.(^ast.Ellipsis); ok {
+ return arg, true
+ }
}
for name in arg.names {
if index == parameter_index {