changeset 8023:2d34d02b27af

Fix RT-38574: Deadlock in Presenting/UploadingPainter if resource factory is null Reviewed by: kcr
author flar <James.Graham@oracle.com>
date Tue, 09 Sep 2014 16:16:05 -0700
parents e3db801977ca
children bace5fdce0fe
files modules/graphics/src/main/java/com/sun/javafx/tk/quantum/PresentingPainter.java modules/graphics/src/main/java/com/sun/javafx/tk/quantum/UploadingPainter.java
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/PresentingPainter.java	Tue Sep 09 14:55:44 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/PresentingPainter.java	Tue Sep 09 16:16:05 2014 -0700
@@ -122,7 +122,9 @@
             ViewScene viewScene = (ViewScene)sceneState.getScene();
             viewScene.setPainting(false);
 
-            factory.getTextureResourcePool().freeDisposalRequestedAndCheckResources(errored);
+            if (factory != null) {
+                factory.getTextureResourcePool().freeDisposalRequestedAndCheckResources(errored);
+            }
 
             renderLock.unlock();
         }
--- a/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/UploadingPainter.java	Tue Sep 09 14:55:44 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/tk/quantum/UploadingPainter.java	Tue Sep 09 16:16:05 2014 -0700
@@ -183,7 +183,9 @@
 
             sceneState.getScene().setPainting(false);
 
-            factory.getTextureResourcePool().freeDisposalRequestedAndCheckResources(errored);
+            if (factory != null) {
+                factory.getTextureResourcePool().freeDisposalRequestedAndCheckResources(errored);
+            }
 
             renderLock.unlock();
         }