Skip to content

Commit 39229ed

Browse files
authored
cp_topic_subscriber refactor uninitialized variable bug (#709)
* cp_topic_subscriber refactor uninitialized variable bug * Pre-commit fix
1 parent 4768eb6 commit 39229ed

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

smacc2/include/smacc2/client_core_components/cp_topic_subscriber.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ class CpTopicSubscriber : public smacc2::ISmaccComponent
4040

4141
CpTopicSubscriber() { initialized_ = false; }
4242

43-
CpTopicSubscriber(std::string topicname) { topicName_ = topicname; }
43+
CpTopicSubscriber(std::string topicname)
44+
{
45+
topicName_ = topicname;
46+
initialized_ = false;
47+
}
4448

4549
virtual ~CpTopicSubscriber() {}
4650

0 commit comments

Comments
 (0)