don't destroy when not created

better error message
This commit is contained in:
Brian Matzon 2004-01-08 22:43:27 +00:00
parent 803c5391a5
commit 6fa36c3432
1 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,7 @@ public abstract class BasicTest {
try {
AL.create();
} catch (Exception e) {
e.printStackTrace();
System.out.println("Unable to create OpenAL.\nPlease make sure that OpenAL is available on this system.");
return;
}
}
@ -64,7 +64,9 @@ public abstract class BasicTest {
* Shutdowns OpenAL
*/
protected void alExit() {
AL.destroy();
if(AL.isCreated()) {
AL.destroy();
}
}
/**