mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #5261 from spiel0meister/master
add a missing nullptr check
This commit is contained in:
@@ -263,6 +263,9 @@ gb_internal void check_did_you_mean_scope(String const &name, Scope *scope, char
|
|||||||
|
|
||||||
gb_internal Entity *entity_from_expr(Ast *expr) {
|
gb_internal Entity *entity_from_expr(Ast *expr) {
|
||||||
expr = unparen_expr(expr);
|
expr = unparen_expr(expr);
|
||||||
|
if (expr == nullptr) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
switch (expr->kind) {
|
switch (expr->kind) {
|
||||||
case Ast_Ident:
|
case Ast_Ident:
|
||||||
return expr->Ident.entity;
|
return expr->Ident.entity;
|
||||||
|
|||||||
Reference in New Issue
Block a user