Skip to content

Commit 9415c61

Browse files
authored
Merge pull request supertuxkart#4000 from mstoeckl/wayland-conn-close
Close program when Wayland connection hangs up
2 parents 1c79f04 + 1686a9e commit 9415c61

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)