mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
The database map stores GC::Weak<Database> entries. When the GC collects a Database, the weak pointer goes null but the map entry remains. The old code dereferenced the weak pointer without checking liveness, causing a null reference binding (UBSan). Fix this by checking ptr() before dereferencing, and cleaning up the stale map entry if the database was collected.
5.8 KiB
5.8 KiB