module: improve error message for use-after-delete of objects
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
30bba9d49e
commit
a28b9798a8
1 changed files with 1 additions and 1 deletions
|
|
@ -318,7 +318,7 @@ pub fn Objects(options: ObjectsOptions, comptime T: type) type {
|
||||||
// e.g. in release builds
|
// e.g. in release builds
|
||||||
const unpacked: PackedID = @bitCast(id);
|
const unpacked: PackedID = @bitCast(id);
|
||||||
if (unpacked.generation != generation.items[unpacked.index]) {
|
if (unpacked.generation != generation.items[unpacked.index]) {
|
||||||
@panic("mach: " ++ fn_name ++ "() called with an object that is no longer valid");
|
@panic("mach: " ++ fn_name ++ "() called on a dead object (use after delete)");
|
||||||
}
|
}
|
||||||
if (dead.isSet(unpacked.index)) {
|
if (dead.isSet(unpacked.index)) {
|
||||||
@panic("mach: " ++ fn_name ++ "() called on a dead object");
|
@panic("mach: " ++ fn_name ++ "() called on a dead object");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue