Merge pull request #114 from metc/master

Fix a `java.lang.NullPointerException`.
This commit is contained in:
Ioannis Tsakpinis 2015-04-29 20:23:49 +03:00
commit a33e83ee38
1 changed files with 3 additions and 1 deletions

View File

@ -143,10 +143,12 @@ final class LinuxContextImplementation implements ContextImplementation {
public void setSwapInterval(int value) {
ContextGL current_context = ContextGL.getCurrentContext();
PeerInfo peer_info = current_context.getPeerInfo();
if ( current_context == null )
throw new IllegalStateException("No context is current");
PeerInfo peer_info = current_context.getPeerInfo();
synchronized ( current_context ) {
LinuxDisplay.lockAWT();
try {