8175345: Reported null pointer dereference defect groups

Added required explicit NULL checks

Reviewed-by: thartmann, kvn
This commit is contained in:
Rahul Raghavan 2017-03-09 00:16:51 -08:00
parent 3064b3e35d
commit b2783bb80a
4 changed files with 13 additions and 7 deletions

View file

@ -891,8 +891,9 @@ bool StringConcat::validate_control_flow() {
ctrl_path.push(cn);
ctrl_path.push(cn->proj_out(0));
ctrl_path.push(cn->proj_out(0)->unique_out());
if (cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0) != NULL) {
ctrl_path.push(cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0));
Node* catchproj = cn->proj_out(0)->unique_out()->as_Catch()->proj_out(0);
if (catchproj != NULL) {
ctrl_path.push(catchproj);
}
} else {
ShouldNotReachHere();