mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 22:46:04 +03:00
Add missing NULL test.
This commit is contained in:
parent
b54cb0fd66
commit
49c4ad76e1
1 changed files with 4 additions and 0 deletions
|
@ -323,6 +323,10 @@ c_list_t *c_list_last(c_list_t *list) {
|
|||
* Gets the element at the given positon in a c_list
|
||||
*/
|
||||
c_list_t *c_list_position(c_list_t *list, long position) {
|
||||
if (list == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while ((position-- > 0) && list != NULL) {
|
||||
list = list->next;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue