summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/util/JogampVersion.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-01-31 07:01:39 +0100
committerSven Gothel <[email protected]>2011-01-31 07:01:39 +0100
commit429e4121d4fcb0ff4e18e15d647e922ff4618ab0 (patch)
tree4f040c30164cf242ff8ea190f4a4e7cf1d5f8c9e /src/java/com/jogamp/common/util/JogampVersion.java
parent10c62de831ef208007402134fa2ac9cca85f4770 (diff)
Fix: Avoid NPE in case no manifest is available (running w/o JAR)
Diffstat (limited to 'src/java/com/jogamp/common/util/JogampVersion.java')
-rw-r--r--src/java/com/jogamp/common/util/JogampVersion.java6
1 files changed, 3 insertions, 3 deletions
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();
}