| Index: sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
|
| diff --git a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
|
| index 1ab1cd79cbbe5678c5002945bea0bd36032a43ff..08836fdde3eec5543f255389e96c2df37aa43273 100644
|
| --- a/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
|
| +++ b/sdk/lib/web_gl/dart2js/web_gl_dart2js.dart
|
| @@ -2402,7 +2402,7 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
|
| @DomName('WebGLRenderingContext.texImage2D')
|
| @DocsEditable
|
| void texImage2D(int target, int level, int internalformat, int format_OR_width, int height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, [int format, int type, TypedData pixels]) {
|
| - if ((border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null)) {
|
| + if ((border_OR_canvas_OR_image_OR_pixels_OR_video is int || border_OR_canvas_OR_image_OR_pixels_OR_video == null) && format != null && type != null) {
|
| _texImage2D_1(target, level, internalformat, format_OR_width, height_OR_type, border_OR_canvas_OR_image_OR_pixels_OR_video, format, type, pixels);
|
| return;
|
| }
|
| @@ -2457,7 +2457,7 @@ class RenderingContext extends CanvasRenderingContext native "WebGLRenderingCont
|
| @DomName('WebGLRenderingContext.texSubImage2D')
|
| @DocsEditable
|
| void texSubImage2D(int target, int level, int xoffset, int yoffset, int format_OR_width, int height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, [int type, TypedData pixels]) {
|
| - if ((canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null)) {
|
| + if ((canvas_OR_format_OR_image_OR_pixels_OR_video is int || canvas_OR_format_OR_image_OR_pixels_OR_video == null) && type != null) {
|
| _texSubImage2D_1(target, level, xoffset, yoffset, format_OR_width, height_OR_type, canvas_OR_format_OR_image_OR_pixels_OR_video, type, pixels);
|
| return;
|
| }
|
|
|