aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index b32bebc307..b6cf0f2d96 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -697,8 +697,7 @@ static LLVMValueRef gen_field_ptr(CodeGen *g, AstNode *node, TypeTableEntry **ou
LLVMValueRef struct_ptr;
if (struct_expr_node->type == NodeTypeSymbol) {
- VariableTableEntry *var = find_variable(struct_expr_node->block_context,
- &struct_expr_node->data.symbol_expr.symbol);
+ VariableTableEntry *var = struct_expr_node->data.symbol_expr.variable;
assert(var);
if (var->is_ptr && var->type->id == TypeTableEntryIdPointer) {