Merge pull request #2977 from orestisf1993/issue-1627

Check container existance during drag events
This commit is contained in:
Ingo Bürk
2017-09-23 10:40:34 +02:00
committed by GitHub
3 changed files with 37 additions and 6 deletions

View File

@ -604,6 +604,15 @@ Con *con_by_con_id(long target) {
return NULL;
}
/*
* Returns true if the given container (still) exists.
* This can be used, e.g., to make sure a container hasn't been closed in the meantime.
*
*/
bool con_exists(Con *con) {
return con_by_con_id((long)con) != NULL;
}
/*
* Returns the container with the given frame ID or NULL if no such container
* exists.