mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-18 16:55:14 +02:00
prevent segfault on load fail
This commit is contained in:
@@ -35,6 +35,11 @@ extern "C"
|
||||
draftmodel_filename = inputs.draftmodel_filename;
|
||||
|
||||
file_format = check_file_format(model.c_str(),&file_format_meta);
|
||||
if (file_format == FileFormat::BADFORMAT)
|
||||
{
|
||||
fprintf(stderr, "%s: error: invalid or unsupported model file '%s'\n", __func__, model.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
executable_path = inputs.executable_path;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user