Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui committed Dec 3, 2024
1 parent 54609bc commit ac53182
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/c_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ ncnn_modelbin_t ncnn_modelbin_create_from_mat_array(const ncnn_mat_t* weights, i
matarray[i] = *(const Mat*)weights[i];
}
ncnn_modelbin_t mb = (ncnn_modelbin_t)malloc(sizeof(struct __ncnn_modelbin_t));
mb->pthis = (void*)(new ModelBinFromMatArray_c_api(mb, &matarray[0]));
mb->pthis = (void*)(new ModelBinFromMatArray_c_api(mb, n ? &matarray[0] : NULL));
mb->load_1d = __ncnn_ModelBinFromMatArray_load_1d;
mb->load_2d = __ncnn_ModelBinFromMatArray_load_2d;
mb->load_3d = __ncnn_ModelBinFromMatArray_load_3d;
Expand Down

0 comments on commit ac53182

Please sign in to comment.