Skip to content

Commit

Permalink
Ensure moduleName is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-klein committed Oct 26, 2024
1 parent 98612da commit 4d34497
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sword_backend/dict_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ std::vector<std::string> DictHelper::getKeyList(std::string moduleName)
{
vector<string> keyList;

if (moduleName.size() == 0) {
cerr << "getKeyList: Cannot work with empty moduleName!" << endl;
return keyList;
}

SWModule* module = this->_moduleStore.getLocalModule(moduleName);

if (module == 0) {
Expand Down

0 comments on commit 4d34497

Please sign in to comment.