commit | 71b1476c57a7af988fac993f31bb1e66fd34e954 | [log] [tgz] |
---|---|---|
author | alexander.behm <alexander.behm@123451ca-8445-de46-9d55-352943316053> | Wed Nov 24 08:00:46 2010 +0000 |
committer | alexander.behm <alexander.behm@123451ca-8445-de46-9d55-352943316053> | Wed Nov 24 08:00:46 2010 +0000 |
tree | d5f1638e12025e04c016002a71a7e01d17061948 | |
parent | 7287026f037774abb9f5ff7f7a02c9d82b94a9c3 [diff] |
Fixed bug when close() is called on closed cursor. git-svn-id: https://hyracks.googlecode.com/svn/trunk/hyracks@211 123451ca-8445-de46-9d55-352943316053
diff --git a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/RangeSearchCursor.java b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/RangeSearchCursor.java index e0bd016..b451046 100644 --- a/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/RangeSearchCursor.java +++ b/hyracks-storage-am-btree/src/main/java/edu/uci/ics/hyracks/storage/am/btree/impls/RangeSearchCursor.java
@@ -42,9 +42,11 @@ @Override public void close() throws Exception { - page.releaseReadLatch(); - bufferCache.unpin(page); - page = null; + if(page != null) { + page.releaseReadLatch(); + bufferCache.unpin(page); + page = null; + } } public ITupleReference getTuple() {