From 429e4121d4fcb0ff4e18e15d647e922ff4618ab0 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 31 Jan 2011 07:01:39 +0100 Subject: Fix: Avoid NPE in case no manifest is available (running w/o JAR) --- src/java/com/jogamp/common/util/JogampVersion.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/java/com') diff --git a/src/java/com/jogamp/common/util/JogampVersion.java b/src/java/com/jogamp/common/util/JogampVersion.java index 2c218ce..f7da413 100644 --- a/src/java/com/jogamp/common/util/JogampVersion.java +++ b/src/java/com/jogamp/common/util/JogampVersion.java @@ -48,9 +48,9 @@ public class JogampVersion { protected JogampVersion(String packageName, Manifest mf) { this.packageName = packageName; - this.mf = mf; - this.hash = mf.hashCode(); - mainAttributes = mf.getMainAttributes(); + this.mf = ( null != mf ) ? mf : new Manifest(); + this.hash = this.mf.hashCode(); + mainAttributes = this.mf.getMainAttributes(); mainAttributeNames = mainAttributes.keySet(); } -- cgit v1.2.3