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.
This commit is contained in:
parent
e4271a787f
commit
da3f4923f1
1 changed files with 1 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue