diff options
| author | Robert Gemmell <robbie@apache.org> | 2013-10-02 12:54:09 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2013-10-02 12:54:09 +0000 |
| commit | f2de2f349ac5c8fb26893081e3a414bc842f80b2 (patch) | |
| tree | 546ae4e4c4689a54fa2806d7c637683a4d449267 /java | |
| parent | 362fb1dff99201209c64c07e78442a688be58028 (diff) | |
| download | qpid-python-f2de2f349ac5c8fb26893081e3a414bc842f80b2.tar.gz | |
QPID-5195: verify _receivingSessions array has been initialised before accessing it during closure
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1528451 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
| -rw-r--r-- | java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ConnectionEndpoint.java | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ConnectionEndpoint.java b/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ConnectionEndpoint.java index cac4e88178..5775eb4c2e 100644 --- a/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ConnectionEndpoint.java +++ b/java/amqp-1-0-common/src/main/java/org/apache/qpid/amqp_1_0/transport/ConnectionEndpoint.java @@ -410,13 +410,16 @@ public class ConnectionEndpoint implements DescribedTypeConstructorRegistry.Sour default: } - for (int i = 0; i < _receivingSessions.length; i++) + if(_receivingSessions != null) { - if (_receivingSessions[i] != null) + for (int i = 0; i < _receivingSessions.length; i++) { - _receivingSessions[i].end(); - _receivingSessions[i] = null; + if (_receivingSessions[i] != null) + { + _receivingSessions[i].end(); + _receivingSessions[i] = null; + } } } } |
