Commit 47f6160a authored by Dominik Charousset's avatar Dominik Charousset

Fix segfault in lazy_init stateful actors

parent 3ea75732
...@@ -54,7 +54,8 @@ public: ...@@ -54,7 +54,8 @@ public:
/// Destroys the state of this actor (no further overriding allowed). /// Destroys the state of this actor (no further overriding allowed).
void on_exit() final { void on_exit() final {
CAF_LOG_TRACE(""); CAF_LOG_TRACE("");
state_.~State(); if (this->is_initialized())
state_.~State();
} }
const char* name() const final { const char* name() const final {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment