Skip to content

Commit 1c7f0a8

Browse files
committed
Add support for null for WebGL* opaque handles
Change-Id: I864a9875a919c7192ee403cc0eef43bf5f69a53e
1 parent bd80f2a commit 1c7f0a8

File tree

2 files changed

+114
-114
lines changed

2 files changed

+114
-114
lines changed

api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ forEach({
238238
sig.push(type.name);
239239
fullArgs.push(type.name + " " + arg);
240240
if (type.name.substr(0, 5) === "WebGL") {
241-
cargs.push(arg + "._");
242-
check.push(arg + " instanceof " + type.name);
241+
cargs.push(arg + " ? " + arg + "._ : 0");
242+
check.push("(" + arg + " === null || " + arg + " instanceof " + type.name + ")");
243243
} else {
244244
cargs.push(arg);
245245
check.push("typeof " + arg + ' === "object"');

0 commit comments

Comments
 (0)