We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
null pointer
1 parent e0c0ea6 commit 6a03c86Copy full SHA for 6a03c86
ext/ai/onnxruntime/tensor.rs
@@ -33,7 +33,8 @@ macro_rules! v8_slice_from {
33
(tensor::<$type:ident>($tensor:expr)) => {{
34
// We must ensure there's some detection to avoid `null pointer` errors
35
// https://github.com/pykeio/ort/issues/185
36
- if $tensor.shape().is_empty() {
+ let n_detections = $tensor.shape()[0];
37
+ if n_detections == 0 {
38
let buf_store =
39
v8::ArrayBuffer::new_backing_store_from_vec(vec![]).make_shared();
40
let buffer_slice = unsafe {
0 commit comments