mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-01 11:07:56 +00:00
Fix case when message handle is valid but topic is null
This commit is contained in:
@@ -108,7 +108,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
std::string get_topic() const {
|
std::string get_topic() const {
|
||||||
assert(handle_);
|
assert(handle_);
|
||||||
return rd_kafka_topic_name(handle_->rkt);
|
return handle_->rkt ? rd_kafka_topic_name(handle_->rkt) : std::string{};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user