diff options
author | Joseph Tremoulet <JCTremoulet@gmail.com> | 2017-03-20 17:13:14 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-20 17:13:14 -0400 |
commit | 281da0a152ff5dc65b4bebcc95d19ec8e4a4508e (patch) | |
tree | 3074991d2c112af067e860abb8b8ccd7a99e6931 | |
parent | 750085eaa497dbcd15c8888f66cd7a3920d7a949 (diff) | |
parent | ffe7ea09fc7cb027cf832520090974de09947881 (diff) | |
download | coreclr-281da0a152ff5dc65b4bebcc95d19ec8e4a4508e.tar.gz coreclr-281da0a152ff5dc65b4bebcc95d19ec8e4a4508e.tar.bz2 coreclr-281da0a152ff5dc65b4bebcc95d19ec8e4a4508e.zip |
Merge pull request #10319 from JosephTremoulet/NullField
Permit null object in `GenTreeUseEdgeIterator`
-rw-r--r-- | src/jit/gentree.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/jit/gentree.cpp b/src/jit/gentree.cpp index f0b2e41a54..243f6cf40e 100644 --- a/src/jit/gentree.cpp +++ b/src/jit/gentree.cpp @@ -9322,9 +9322,15 @@ GenTreeUseEdgeIterator::GenTreeUseEdgeIterator(GenTree* node) return; case GT_FIELD: - m_edge = &m_node->AsField()->gtFldObj; - assert(*m_edge != nullptr); - m_advance = &GenTreeUseEdgeIterator::Terminate; + if (m_node->AsField()->gtFldObj == nullptr) + { + m_state = -1; + } + else + { + m_edge = &m_node->AsField()->gtFldObj; + m_advance = &GenTreeUseEdgeIterator::Terminate; + } return; case GT_STMT: |