Initialize these to nullptr to prevent double deletion when a model fails to load.

This commit is contained in:
Adam Treat
2023-06-20 18:23:45 -04:00
parent 85bc861835
commit bd58c46da0
3 changed files with 3 additions and 0 deletions

View File

@@ -833,6 +833,7 @@ struct GPTJPrivate {
GPTJ::GPTJ()
: d_ptr(new GPTJPrivate) {
d_ptr->model = new gptj_model;
d_ptr->model->ctx = nullptr;
d_ptr->modelLoaded = false;
}