Skip to content

Commit

Permalink
'[Fixed]' Exception when comparing eServiceReference with null
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarCC authored and fairbird committed Feb 4, 2024
1 parent cf15614 commit 53a7f60
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/service/iservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ class eServiceReference
std::string toCompareString() const;
bool operator==(const eServiceReference &c) const
{
if (type != c.type)
if (!c || type != c.type)
return 0;
return (memcmp(data, c.data, sizeof(int)*8)==0) && (path == c.path);
}
Expand All @@ -182,6 +182,8 @@ class eServiceReference
}
bool operator<(const eServiceReference &c) const
{
if (!c) return 0;

if (type < c.type)
return 1;

Expand Down

0 comments on commit 53a7f60

Please sign in to comment.