Fix case when message handle is valid but topic is null

This commit is contained in:
Alexander Damian
2020-01-27 10:30:12 -05:00
parent c3b4580fef
commit 81ce56a1bd

View File

@@ -108,7 +108,7 @@ public:
*/
std::string get_topic() const {
assert(handle_);
return rd_kafka_topic_name(handle_->rkt);
return handle_->rkt ? rd_kafka_topic_name(handle_->rkt) : std::string{};
}
/**