[libbluray-devel] BDGraphics: Do not draw if already disposed
hpi1
git at videolan.org
Thu Nov 19 14:43:12 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Nov 19 15:20:44 2015 +0200| [952f6516e13a1119bd964d32177c3b410dd7fd37] | committer: hpi1
BDGraphics: Do not draw if already disposed
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=952f6516e13a1119bd964d32177c3b410dd7fd37
---
src/libbluray/bdj/java/java/awt/BDGraphicsBase.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java b/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
index 0c7d403..f7e60f7 100644
--- a/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
+++ b/src/libbluray/bdj/java/java/awt/BDGraphicsBase.java
@@ -306,7 +306,7 @@ abstract class BDGraphicsBase extends Graphics2D implements ConstrainableGraphic
Rectangle rect = new Rectangle(x, y, length, 1);
rect = actualClip.intersection(rect);
- if (rect.width <= 0 || rect.height <= 0 || rect.x < 0 || rect.y < 0) {
+ if (rect.width <= 0 || rect.height <= 0 || rect.x < 0 || rect.y < 0 || backBuffer == null) {
return;
}
@@ -364,7 +364,7 @@ abstract class BDGraphicsBase extends Graphics2D implements ConstrainableGraphic
Rectangle rect = new Rectangle(x, y, length, 1);
rect = actualClip.intersection(rect);
- if (rect.width <= 0 || rect.height <= 0 || rect.x < 0 || rect.y < 0) {
+ if (rect.width <= 0 || rect.height <= 0 || rect.x < 0 || rect.y < 0 || backBuffer == null) {
return;
}
@@ -458,7 +458,7 @@ abstract class BDGraphicsBase extends Graphics2D implements ConstrainableGraphic
y += originY;
Rectangle rect = new Rectangle(x, y, w, h);
rect = actualClip.intersection(rect);
- if (rect.isEmpty()) {
+ if (rect.isEmpty() || backBuffer == null) {
return;
}
x = rect.x;
@@ -572,7 +572,7 @@ abstract class BDGraphicsBase extends Graphics2D implements ConstrainableGraphic
Rectangle rect = new Rectangle(x, y, w, h);
rect = actualClip.intersection(rect);
- if (rect.width <= 0 || rect.height <= 0) {
+ if (rect.width <= 0 || rect.height <= 0 || backBuffer == null) {
return;
}
More information about the libbluray-devel
mailing list