webgl: A few fixes regarding the nullability of WebGL parameters.

This commit is contained in:
Emilio Cobos Álvarez 2016-09-17 13:40:18 -07:00
parent a0e404c79e
commit ea8f115b8c
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 102 additions and 77 deletions

View file

@ -535,6 +535,8 @@ unsafe impl ArrayBufferViewContents for f64 {
/// Returns a mutable slice of the Array Buffer View data, viewed as T, without checking the real
/// type of it.
pub unsafe fn array_buffer_view_data<'a, T: ArrayBufferViewContents>(abv: *mut JSObject) -> Option<&'a mut [T]> {
assert!(!abv.is_null());
let mut byte_length = 0;
let mut ptr = ptr::null_mut();
let mut is_shared = false;