Skip to content

Commit

Permalink
- Don't strcmp NULL-pointers
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10185 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 21, 2011
1 parent 7b0e7fe commit 563c838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Compiler/runtime/systemimpl.c
Expand Up @@ -1489,7 +1489,7 @@ int SystemImpl__getLoadModelPath(const char *name, void *prios, void *mps, const
if (prio == 1 && 0 == strcmp("Modelica",name) && 0 == strcmp(version,"3.1")) prio = -1;
if (prio == 1 && 0 == strcmp("ModelicaServices",name) && 0 == strcmp(version,"1.0")) prio = -1;
/* TODO: Use something better than strcmp. We need natural sort for all cases... */
if (prio < defaultPrio || (prio == defaultPrio && strcmp(version, defaultVersion) > 0)) {
if (prio < defaultPrio || (prio == defaultPrio && version && defaultVersion && (strcmp(version, defaultVersion) > 0))) {
defaultPrio = prio;
*outDir = mp;
if (*outName) free(*outName);
Expand Down

0 comments on commit 563c838

Please sign in to comment.