Skip to content
Snippets Groups Projects
Commit b77fd233 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

c wrapper: return null if no signer

parent c0e11787
No related branches found
No related tags found
No related merge requests found
...@@ -84,7 +84,7 @@ dht_value_id dht_value_get_id(const dht_value* data) { ...@@ -84,7 +84,7 @@ dht_value_id dht_value_get_id(const dht_value* data) {
dht_publickey* dht_value_get_owner(const dht_value* data) { dht_publickey* dht_value_get_owner(const dht_value* data) {
const ValueSp& vsp(*reinterpret_cast<const ValueSp*>(data)); const ValueSp& vsp(*reinterpret_cast<const ValueSp*>(data));
return reinterpret_cast<dht_publickey*>(new PubkeySp(vsp->owner)); return vsp->owner ? reinterpret_cast<dht_publickey*>(new PubkeySp(vsp->owner)) : nullptr;
} }
dht_infohash dht_value_get_recipient(const dht_value* data) { dht_infohash dht_value_get_recipient(const dht_value* data) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment