aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/imagedata.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/imagedata.rs')
-rw-r--r--components/script/dom/imagedata.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/dom/imagedata.rs b/components/script/dom/imagedata.rs
index 9a51c0088d1..9e80d86d089 100644
--- a/components/script/dom/imagedata.rs
+++ b/components/script/dom/imagedata.rs
@@ -160,7 +160,6 @@ impl ImageDataMethods for ImageData {
#[allow(unsafe_code)]
// https://html.spec.whatwg.org/multipage/#dom-imagedata-data
unsafe fn Data(&self, _: *mut JSContext) -> NonNull<JSObject> {
- assert!(!self.data.get().is_null());
- NonNull::new_unchecked(self.data.get())
+ NonNull::new(self.data.get()).expect("got a null pointer")
}
}