Skip to content

Commit

Permalink
hardened TOrmCacheTable.Get method
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed May 10, 2024
1 parent 168a0e5 commit 2b2957f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'2.2.7480'
'2.2.7481'
1 change: 1 addition & 0 deletions src/orm/mormot.orm.base.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10823,6 +10823,7 @@ function TOrmCacheTable.Get(aID: TID): pointer;
result := nil;
if (@self = nil) or
not CacheEnable or
(Value = nil) or
(TimeOutMS <> 0) then // by safety: TimeOutMS may delete the instance
exit;
i := SortFind(Value, aID, Count);
Expand Down

0 comments on commit 2b2957f

Please sign in to comment.