aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-03-20 06:40:30 +0100
committerSven Gothel <[email protected]>2023-03-20 06:40:30 +0100
commit1cb97973a7403fe1b47665e8250bc568444301da (patch)
treed253644e707d2dfb8d53b276eac2ab90fc26134e /src
parentb2a271e289047a7e5bba6c09540061c43527db3c (diff)
GraphUI MediaButton: Only mark region dirty if already exists
Diffstat (limited to 'src')
-rw-r--r--src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java
index f3090069c..e858093ab 100644
--- a/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java
+++ b/src/graphui/classes/com/jogamp/graph/ui/gl/shapes/MediaButton.java
@@ -128,7 +128,9 @@ public class MediaButton extends TexSeqButton {
resetGL = false;
try {
mPlayer.initGL(gl);
- region.markShapeDirty(); // reset texture data
+ if( null != region ) {
+ region.markShapeDirty(); // reset texture data
+ }
} catch (final Exception e) {
e.printStackTrace();
}