Ensure the correct model is updated by checking the uid

The uid should be a value > 0
This commit is contained in:
0xboobface 2018-11-24 15:33:48 +01:00
parent 72064eb55b
commit 6fa9de4a32
1 changed files with 1 additions and 1 deletions

View File

@ -527,7 +527,7 @@ public class MyFreeCamsClient {
for (SessionState state : sessionStates.asMap().values()) {
String nm = Optional.ofNullable(state.getNm()).orElse("");
String name = Optional.ofNullable(model.getName()).orElse("");
if(Objects.equals(nm.toLowerCase(), name.toLowerCase()) || Objects.equals(model.getUid(), state.getUid())) {
if(Objects.equals(nm.toLowerCase(), name.toLowerCase()) || Objects.equals(model.getUid(), state.getUid()) && state.getUid() > 0) {
model.update(state, getStreamUrl(state));
return;
}