6995769: occasion NPE thrown from SwingUtilities.computeIntersection()

Reviewed-by: alexp
This commit is contained in:
Pavel Porvatov 2011-07-28 18:13:17 +04:00
parent d8fd6d70de
commit 6abadbf15a

View File

@ -758,6 +758,11 @@ public class RepaintManager
for(i=0 ; i < count ; i++) {
dirtyComponent = roots.get(i);
rect = tmpDirtyComponents.get(dirtyComponent);
// Sometimes when RepaintManager is changed during the painting
// we may get null here, see #6995769 for details
if (rect == null) {
continue;
}
localBoundsH = dirtyComponent.getHeight();
localBoundsW = dirtyComponent.getWidth();