Skip to content

Commit 8923832

Browse files
committed
- Don't segfault if we have 0 libraries
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@15509 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent ac903df commit 8923832

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Compiler/FrontEnd/ModelicaBuiltin.mo

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1897,6 +1897,7 @@ algorithm
18971897
isFileUri := regexBool(uri, "^file://", caseInsensitive=true);
18981898
if isModelicaUri then
18991899
libraries := getLoadedLibraries();
1900+
assert(sum(1 for lib in libraries) > 0, "No libraries loaded");
19001901
path := matches[2];
19011902
while path <> "" loop
19021903
(numMatches,matches2) := regex(path, "^([A-Za-z_][A-Za-z0-9_]*)?[.]?(.*)?$",3);

0 commit comments

Comments
 (0)