Commit 1ec4f268 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

Scanner: Clean up display destroy listener in deferred global destroy func

We also need to clean up the display destroy listener in the deferred
global destroy func to avoid use-after-free bugs on the display tear down.
parent f66f7192
Pipeline #61658 passed with stage
in 5 minutes and 28 seconds
......@@ -696,6 +696,7 @@ bool Scanner::process()
printf(" object->m_global = nullptr;\n");
printf(" wl_event_source_remove(object->m_globalRemovedEvent);\n");
printf(" object->m_globalRemovedEvent = nullptr;\n");
printf(" wl_list_remove(&object->m_displayDestroyedListener.link);\n");
printf(" object->%s_destroy_global();\n", interfaceNameStripped);
printf(" return 0;\n");
printf(" }\n");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment