forked from j62/ctbrec
1
0
Fork 0

Fix possible NPE in getStreamUrl

This commit is contained in:
0xboobface 2018-11-24 15:20:45 +01:00
parent edb11a0efc
commit 72064eb55b
1 changed files with 2 additions and 2 deletions

View File

@ -538,8 +538,8 @@ public class MyFreeCamsClient {
}
public String getStreamUrl(SessionState state) {
Integer camserv = state.getU().getCamserv();
if(camserv != null) {
Integer camserv = Optional.ofNullable(state.getU()).map(u -> u.getCamserv()).orElse(-1);
if(camserv != null && camserv != -1) {
int userChannel = 100000000 + state.getUid();
String streamUrl = "";
String phase = state.getU().getPhase() != null ? state.getU().getPhase() : "z";