Message ID | 20220613113713.13681-1-wangyouwan@uniontech.com |
---|---|
State | New |
Headers | show |
Series | obexd: Fix callback->func =! NULL in the xfer_complete() func | expand |
diff --git a/obexd/client/transfer.c b/obexd/client/transfer.c index dccce03b4..a7a85a0c0 100644 --- a/obexd/client/transfer.c +++ b/obexd/client/transfer.c @@ -666,7 +666,10 @@ static void xfer_complete(GObex *obex, GError *err, gpointer user_data) else transfer_set_status(transfer, TRANSFER_STATUS_COMPLETE); - if (callback) + if (callback == NULL) + return; + + if (callback->func) callback->func(transfer, err, callback->data); }