mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2024-10-01 01:06:10 -04:00
Initialize these to nullptr to prevent double deletion when a model fails to load.
This commit is contained in:
parent
85bc861835
commit
bd58c46da0
@ -833,6 +833,7 @@ struct GPTJPrivate {
|
|||||||
GPTJ::GPTJ()
|
GPTJ::GPTJ()
|
||||||
: d_ptr(new GPTJPrivate) {
|
: d_ptr(new GPTJPrivate) {
|
||||||
d_ptr->model = new gptj_model;
|
d_ptr->model = new gptj_model;
|
||||||
|
d_ptr->model->ctx = nullptr;
|
||||||
d_ptr->modelLoaded = false;
|
d_ptr->modelLoaded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -757,6 +757,7 @@ struct MPTPrivate {
|
|||||||
MPT::MPT()
|
MPT::MPT()
|
||||||
: d_ptr(new MPTPrivate) {
|
: d_ptr(new MPTPrivate) {
|
||||||
d_ptr->model = new mpt_model;
|
d_ptr->model = new mpt_model;
|
||||||
|
d_ptr->model->ctx = nullptr;
|
||||||
d_ptr->modelLoaded = false;
|
d_ptr->modelLoaded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -884,6 +884,7 @@ Replit::Replit()
|
|||||||
: d_ptr(new ReplitPrivate) {
|
: d_ptr(new ReplitPrivate) {
|
||||||
|
|
||||||
d_ptr->model = new replit_model;
|
d_ptr->model = new replit_model;
|
||||||
|
d_ptr->model->ctx = nullptr;
|
||||||
d_ptr->modelLoaded = false;
|
d_ptr->modelLoaded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user