Skip to content

Commit 1686a9e

Browse files
committed
Close program when Wayland connection hangs up
This change ensures that SuperTuxKart will not keep running in the background when the compositor crashes and doesn't close the STK main window.
1 parent ac99ace commit 1686a9e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/irrlicht/source/Irrlicht/CIrrDeviceWayland.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1283,7 +1283,10 @@ bool CIrrDeviceWayland::run()
12831283
{
12841284
os::Timer::tick();
12851285

1286-
wl_display_dispatch_pending(m_display);
1286+
if (wl_display_dispatch_pending(m_display) == -1)
1287+
{
1288+
closeDevice();
1289+
}
12871290

12881291
for (unsigned int i = 0; i < m_events.size(); i++)
12891292
{

0 commit comments

Comments
 (0)