浏览代码

Fixed field initializer crash

Brian Fiete 5 年之前
父节点
当前提交
a29f22d227
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      IDEHelper/Compiler/BfModule.cpp

+ 2 - 2
IDEHelper/Compiler/BfModule.cpp

@@ -3802,10 +3802,10 @@ BfTypedValue BfModule::GetFieldInitializerValue(BfFieldInstance* fieldInstance,
 	if (fieldInstance != NULL)
 		MarkFieldInitialized(fieldInstance);
 
-	if (doStore)
+	if ((doStore) && (result))
 	{
 		result = LoadValue(result);
-		if (!result.mType->IsValuelessType())		
+		if (!result.mType->IsValuelessType())
 			mBfIRBuilder->CreateStore(result.mValue, staticVarRef.mValue);		
 	}