8180576: Null pointer dereference in Matcher::xform()

Fixed a missing null check on n->in(0) found by Parfait.

Reviewed-by: kvn
This commit is contained in:
Tobias Hartmann 2017-05-22 09:18:12 +02:00
parent 1d1141fbdf
commit 4b93f11738

@ -1000,7 +1000,7 @@ Node *Matcher::xform( Node *n, int max_stack ) {
if (C->failing()) return NULL;
if (m == NULL) { Matcher::soft_match_failure(); return NULL; }
} else { // Nothing the matcher cares about
if( n->is_Proj() && n->in(0)->is_Multi()) { // Projections?
if (n->is_Proj() && n->in(0) != NULL && n->in(0)->is_Multi()) { // Projections?
// Convert to machine-dependent projection
m = n->in(0)->as_Multi()->match( n->as_Proj(), this );
#ifdef ASSERT