mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix segfault.
This commit is contained in:
parent
54bdaeee39
commit
469d6d4d29
@ -765,7 +765,8 @@ evmasm::AssemblyItems const* CompilerStack::assemblyItems(string const& _contrac
|
|||||||
solThrow(CompilerError, "Compilation was not successful.");
|
solThrow(CompilerError, "Compilation was not successful.");
|
||||||
|
|
||||||
Contract const& currentContract = contract(_contractName);
|
Contract const& currentContract = contract(_contractName);
|
||||||
solAssert(currentContract.evmAssembly->codeSections().size() == 1, "Expected a single code section in legacy codegen.");
|
if (currentContract.evmAssembly)
|
||||||
|
solAssert(currentContract.evmAssembly->codeSections().size() == 1, "Expected a single code section in legacy codegen.");
|
||||||
return currentContract.evmAssembly ? ¤tContract.evmAssembly->codeSections().front().items : nullptr;
|
return currentContract.evmAssembly ? ¤tContract.evmAssembly->codeSections().front().items : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -775,7 +776,8 @@ evmasm::AssemblyItems const* CompilerStack::runtimeAssemblyItems(string const& _
|
|||||||
solThrow(CompilerError, "Compilation was not successful.");
|
solThrow(CompilerError, "Compilation was not successful.");
|
||||||
|
|
||||||
Contract const& currentContract = contract(_contractName);
|
Contract const& currentContract = contract(_contractName);
|
||||||
solAssert(currentContract.evmRuntimeAssembly->codeSections().size() == 1, "Expected a single code section in legacy codegen.");
|
if (currentContract.evmRuntimeAssembly)
|
||||||
|
solAssert(currentContract.evmRuntimeAssembly->codeSections().size() == 1, "Expected a single code section in legacy codegen.");
|
||||||
return currentContract.evmRuntimeAssembly ? ¤tContract.evmRuntimeAssembly->codeSections().front().items : nullptr;
|
return currentContract.evmRuntimeAssembly ? ¤tContract.evmRuntimeAssembly->codeSections().front().items : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user