Pārlūkot izejas kodu

Fixed field initializer crash

Brian Fiete 5 gadi atpakaļ
vecāks
revīzija
a29f22d227
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  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);		
 	}