mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 03:06:55 -04:00
Fix deinitialization order
This commit is contained in:
parent
22655b337f
commit
0c8543160e
@ -1252,8 +1252,8 @@ pub fn PaletteCompressedRegion(T: type, size: comptime_int) type { // MARK: Pale
|
||||
for(0..size) |i| {
|
||||
newData.setValue(i, paletteMap[self.data.getValue(i)]);
|
||||
}
|
||||
self.data.deinit();
|
||||
self.data.content.store(newData.content.load(.unordered), .release);
|
||||
newData.content.store(self.data.content.swap(newData.content.load(.unordered), .release), .unordered);
|
||||
newData.deinit();
|
||||
self.paletteLength = self.activePaletteEntries;
|
||||
self.palette = main.globalAllocator.realloc(self.palette, @as(usize, 1) << self.data.content.load(.unordered).bitSize);
|
||||
self.paletteOccupancy = main.globalAllocator.realloc(self.paletteOccupancy, @as(usize, 1) << self.data.content.load(.unordered).bitSize);
|
||||
|
Loading…
x
Reference in New Issue
Block a user