Skip to content

Commit

Permalink
Check NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
petabyt committed Sep 28, 2024
1 parent e161b11 commit 674c985
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ struct PtpRuntime *ptp_new(int options) {
}

void ptp_set_prop_avail_info(struct PtpRuntime *r, int code, int memb_size, int cnt, void *data) {
if (r->avail == NULL) abort();
// Traverse backwards to first item
struct PtpPropAvail *n;
for (n = r->avail; n != NULL; n = n->prev) {
Expand Down

0 comments on commit 674c985

Please sign in to comment.