mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-26 22:38:00 +01:00
Synchronize access to GlWindow. This seems to help with freezing
This commit is contained in:
parent
a5b0e187a0
commit
b7d17d594c
1 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ public class GLWindow extends DropTarget {
|
|||
/**
|
||||
* Gets or creates the current GLWindow context.
|
||||
*/
|
||||
public static GLWindow current() {
|
||||
public static synchronized GLWindow current() {
|
||||
if (instance == null) {
|
||||
instance = new GLWindow();
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ public class GLWindow extends DropTarget {
|
|||
}
|
||||
}
|
||||
|
||||
public void clearDropTargetListener() {
|
||||
public synchronized void clearDropTargetListener() {
|
||||
if (ready && dropListener != null) {
|
||||
removeDropTargetListener(dropListener);
|
||||
dropListener = null;
|
||||
|
@ -226,7 +226,7 @@ public class GLWindow extends DropTarget {
|
|||
}
|
||||
}
|
||||
|
||||
public void setDropTargetListener(DropTargetListener dtl) {
|
||||
public synchronized void setDropTargetListener(DropTargetListener dtl) {
|
||||
if (!ready) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue