aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/library_gl.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/library_gl.js b/src/library_gl.js
index 389d8d5b..a10b9384 100644
--- a/src/library_gl.js
+++ b/src/library_gl.js
@@ -11,14 +11,13 @@ var LibraryGL = {
if (!(name in this._hashtables)) {
this._hashtables[name] = {
table: {},
- counter: 0,
+ counter: 1,
add: function(obj) {
var id = this.counter++;
this.table[id] = obj;
return id;
},
get: function(id) {
-
if( id == 0 ) return null;
#if ASSERTIONS
assert(id < this.counter, "Invalid id " + id + " for the hashtable " + name);
@@ -26,6 +25,7 @@ var LibraryGL = {
return this.table[id];
},
remove: function(id) {
+ if( id == 0 ) return;
#if ASSERTIONS
assert(id < this.counter, "Invalid id " + id + " for the hashtable " + name);
#endif