diff options
author | Paul Pazderski | 2020-05-11 11:22:14 +0000 |
---|---|---|
committer | Paul Pazderski | 2020-05-11 11:22:48 +0000 |
commit | 537cb2b909c67d19bb0da43fca9a89597c724996 (patch) | |
tree | 46fd599bc871f128abe049e3885fbbdb1db27a29 /org.eclipse.ui.console/src | |
parent | b4ba1469e0c91464256645c6a256a35ce291c841 (diff) | |
download | eclipse.platform.debug-537cb2b909c67d19bb0da43fca9a89597c724996.tar.gz eclipse.platform.debug-537cb2b909c67d19bb0da43fca9a89597c724996.tar.xz eclipse.platform.debug-537cb2b909c67d19bb0da43fca9a89597c724996.zip |
Bug 563041 - NPE in IOConsolePartitioner output appendingI20200511-1800
Unlikely but possible that after output appending job is started but
before entering the synchronized block a partitioner disconnect happens
and 'nulls' the document.
Change-Id: I8be692b7f7374dfe8234e22571c1561f63e07c80
Signed-off-by: Paul Pazderski <paul-eclipse@ppazderski.de>
Diffstat (limited to 'org.eclipse.ui.console/src')
-rw-r--r-- | org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java index d6a73d3d2..6f593fe1b 100644 --- a/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java +++ b/org.eclipse.ui.console/src/org/eclipse/ui/internal/console/IOConsolePartitioner.java @@ -447,8 +447,10 @@ public class IOConsolePartitioner pendingSize = 0; } synchronized (partitions) { - trimJob.setTrimOffset(document.getLength()); - trimJob.schedule(); + if (document != null) { + trimJob.setTrimOffset(document.getLength()); + trimJob.schedule(); + } } } @@ -803,7 +805,9 @@ public class IOConsolePartitioner pendingPartitions.notifyAll(); } synchronized (partitions) { - applyStreamOutput(pendingCopy, size); + if (document != null) { + applyStreamOutput(pendingCopy, size); + } } checkFinished(); checkBufferSize(); |