Fix a `java.lang.NullPointerException`.

See this previous commit 093bfe9698 (diff-9db50c9a42c2d4171ea35b48e3bfcbd3R146)
This commit is contained in:
Christopher Métrailler 2015-04-29 19:18:07 +02:00
parent ef5149a3c3
commit 36e7e73043
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 {