Ratchet: Fix NPE ratcheting IB NSR tagset

This commit is contained in:
zzz
2020-05-01 14:04:14 +00:00
parent 788c72c331
commit eab688b0bc
3 changed files with 11 additions and 4 deletions

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 14;
public final static long BUILD = 15;
/** for example "-test" */
public final static String EXTRA = "";

View File

@ -450,9 +450,12 @@ class RatchetTagSet implements TagSetHandle {
int toTrim = 0;
int tagnum;
while ((tagnum = _sessionTags.keyAt(toTrim)) < tooOld) {
int kidx = _sessionKeys.indexOfKey(tagnum);
if (kidx >= 0)
_sessionKeys.removeAt(kidx);
if (_sessionKeys != null) {
// only for ES tagsets
int kidx = _sessionKeys.indexOfKey(tagnum);
if (kidx >= 0)
_sessionKeys.removeAt(kidx);
}
if (_lsnr != null)
_lsnr.expireTag(_sessionTags.valueAt(toTrim), this);
toTrim++;