Browse Source

Merge branch 'master' of https://github.com/odin-lang/Odin

gingerBill 4 months ago
parent
commit
b615e77264
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/llvm_backend_const.cpp

+ 1 - 1
src/llvm_backend_const.cpp

@@ -33,7 +33,7 @@ gb_internal bool lb_is_elem_const(Ast *elem, Type *elem_type) {
 
 gb_internal bool lb_is_const_nil(lbValue value) {
 	LLVMValueRef v = value.value;
-	if (LLVMIsConstant(v)) {
+	if (v != nullptr && LLVMIsConstant(v)) {
 		if (LLVMIsAConstantAggregateZero(v)) {
 			return true;
 		} else if (LLVMIsAConstantPointerNull(v)) {