diff --git a/src/strucclustutils/structcreatedb.cpp b/src/strucclustutils/structcreatedb.cpp index 66f18521..178ac259 100644 --- a/src/strucclustutils/structcreatedb.cpp +++ b/src/strucclustutils/structcreatedb.cpp @@ -301,6 +301,10 @@ int structcreatedb(int argc, const char **argv, const Command& command) { return EXIT_FAILURE; } ProstT5 *model = prostt5_load(modelWeights.c_str(), false, par.gpu == 0, false, quantized); + if (model == NULL) { + // error message is already printed by prostt5_load + return EXIT_FAILURE; + } #ifdef OPENMP size_t localThreads = par.gpu != 0 ? 1 : par.threads; #endif