mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 02:54:54 +03:00
LibCore: Don't print class_name() from EventReceiver::stop_timer()
If stop_timer() is called from ~EventReceiver(), then the virtual functions will end up calling the overload from the base class. As EventReceiver::class_name() is pure virtual, this calls __cxa_pure_virtual and crashes. We should not be calling virtual functions from the destructor, and especially not pure virtual ones. This "fixes" a crash in Piano, but the root cause of the problem is still unfixed.
This commit is contained in:
parent
50bb785306
commit
e6b8c2bd59
Notes:
sideshowbarker
2024-07-17 06:33:00 +09:00
Author: https://github.com/ADKaster Commit: https://github.com/SerenityOS/serenity/commit/e6b8c2bd59 Pull-request: https://github.com/SerenityOS/serenity/pull/20886
@ -131,7 +131,7 @@ void EventReceiver::stop_timer()
|
||||
return;
|
||||
bool success = Core::EventLoop::unregister_timer(m_timer_id);
|
||||
if (!success) {
|
||||
dbgln("{} {:p} could not unregister timer {}", class_name(), this, m_timer_id);
|
||||
dbgln("{:p} could not unregister timer {}", this, m_timer_id);
|
||||
}
|
||||
m_timer_id = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user