mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
Fix pygame-zero crash
...caused by calling mappable_disconnect() before mappable_connect() and thus hitting an assert() Handle gracefully intead by simply returning. Fixes #1466
This commit is contained in:
parent
396a4b93d1
commit
9f15f7e14a
1 changed files with 7 additions and 1 deletions
|
|
@ -2015,7 +2015,13 @@ void
|
|||
mappable_disconnect(struct mappable *mappable)
|
||||
{
|
||||
assert(mappable);
|
||||
assert(mappable->connected);
|
||||
/*
|
||||
* pygame-zero gets us here without a mappable_connect() first so we
|
||||
* have to handle this gracefully. See issue #1466
|
||||
*/
|
||||
if (!mappable->connected) {
|
||||
return;
|
||||
}
|
||||
wl_list_remove(&mappable->map.link);
|
||||
wl_list_remove(&mappable->unmap.link);
|
||||
mappable->connected = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue