summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAnna Koskinen <Ansku@users.noreply.github.com>2020-04-24 13:12:35 +0300
committerGitHub <noreply@github.com>2020-04-24 13:12:35 +0300
commit59619cf102fa04e78a7636a2a9237914b53a2b0b (patch)
tree86721be7096fadbc02ce72af10411ea1a26293d7 /server
parent8f04d0324fde18a32625c0c75be1b5f85547d451 (diff)
downloadvaadin-framework-59619cf102fa04e78a7636a2a9237914b53a2b0b.tar.gz
vaadin-framework-59619cf102fa04e78a7636a2a9237914b53a2b0b.zip
Fix NPE in FileUploadHandler when use Upload.interruptUpload(). (#11797) (#11961)
* Fix NPE in FileUploadHandler when use Upload.interruptUpload(). (#11797) Fixes #11806
Diffstat (limited to 'server')
-rw-r--r--server/src/main/java/com/vaadin/ui/ConnectorTracker.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
index b2cb185e0a..b8f0ecde95 100644
--- a/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
+++ b/server/src/main/java/com/vaadin/ui/ConnectorTracker.java
@@ -878,10 +878,12 @@ public class ConnectorTracker implements Serializable {
}
Map<String, StreamVariable> nameToStreamVar = pidToNameToStreamVariable
.get(connectorId);
- StreamVariable streamVar = nameToStreamVar.remove(variableName);
- streamVariableToSeckey.remove(streamVar);
- if (nameToStreamVar.isEmpty()) {
- pidToNameToStreamVariable.remove(connectorId);
+ if (nameToStreamVar != null) {
+ StreamVariable streamVar = nameToStreamVar.remove(variableName);
+ streamVariableToSeckey.remove(streamVar);
+ if (nameToStreamVar.isEmpty()) {
+ pidToNameToStreamVariable.remove(connectorId);
+ }
}
}