Skip to content

Commit 37addd6

Browse files
committed
Handle null values in bufferData function
The browser was stopping the execution when receiving a 'null' value for the data parameter. Change-Id: I6cc57b5cb90ee1d2bb0eaf7866028c959b299154 Reviewed-by: Edward Welbourne <[email protected]>
1 parent 7e6b32f commit 37addd6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/plugins/platforms/webgl/webqt.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ window.onload = function () {
409409

410410
gl._bufferData = gl.bufferData;
411411
gl.bufferData = function(target, usage, size, data) {
412-
gl._bufferData(target, data.length === 0 ? size : data, usage);
412+
gl._bufferData(target, data === null || data.length === 0 ? size : data, usage);
413413
};
414414

415415
gl._clearColor = gl.clearColor;

0 commit comments

Comments
 (0)