[libbluray-devel] HScene: log error when created outside of Xlet context

hpi1 git at videolan.org
Mon Mar 28 16:03:28 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Mar 28 14:44:07 2016 +0300| [6e30abb1ffc873c116d4ab79ec0166466553aabf] | committer: hpi1

HScene: log error when created outside of Xlet context

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=6e30abb1ffc873c116d4ab79ec0166466553aabf
---

 src/libbluray/bdj/java/org/havi/ui/HScene.java |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/libbluray/bdj/java/org/havi/ui/HScene.java b/src/libbluray/bdj/java/org/havi/ui/HScene.java
index 926781a..96b9c38 100644
--- a/src/libbluray/bdj/java/org/havi/ui/HScene.java
+++ b/src/libbluray/bdj/java/org/havi/ui/HScene.java
@@ -36,12 +36,16 @@ import java.util.Map;
 import org.havi.ui.event.HEventGroup;
 import org.videolan.BDJXletContext;
 import org.videolan.GUIManager;
+import org.videolan.Logger;
 import java.awt.BDToolkit;
 
 
 public class HScene extends Container implements HComponentOrdering {
     protected HScene() {
         context = BDJXletContext.getCurrentContext();
+        if (context == null) {
+            logger.error("HScene() created from privileged context: " + Logger.dumpStack());
+        }
         BDToolkit.addComponent(this);
     }
 
@@ -432,5 +436,7 @@ public class HScene extends Container implements HComponentOrdering {
     private boolean shortcutsEnabled = true;
     private BDJXletContext context;
 
+    private static final Logger logger = Logger.getLogger(HScene.class.getName());
+
     private static final long serialVersionUID = 422730746877212409L;
 }



More information about the libbluray-devel mailing list