Skip to content

Commit ead2bc6

Browse files
committed
init s_impl_libs in implementationList
1 parent 7b1bf1f commit ead2bc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gpt4all-backend/llmodel.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,10 @@ bool LLModel::Implementation::isImplementation(const Dlhandle &dl) {
7777
return dl.get<bool(uint32_t)>("is_g4a_backend_model_implementation");
7878
}
7979

80-
static std::vector<std::unique_ptr<LLModel::Implementation>> s_impl_libs;
8180
static bool s_scanned = false;
8281

8382
const std::vector<std::unique_ptr<LLModel::Implementation>> &LLModel::Implementation::implementationList() {
83+
static std::vector<std::unique_ptr<LLModel::Implementation>> s_impl_libs;
8484
// NOTE: allocated on heap so we leak intentionally on exit so we have a chance to clean up the
8585
// individual models without the cleanup of the static list interfering
8686
if(!s_scanned) {

0 commit comments

Comments
 (0)