Prevent null pointer access

Thanks to Ingo for fixing the segfault.
This commit is contained in:
Lawrence Lee
2020-09-28 22:17:49 -07:00
parent be858363a6
commit b8af429f0e
2 changed files with 4 additions and 2 deletions

View File

@@ -469,7 +469,9 @@ public:
hListener->setObservable(nullptr);
}
hListener = h;
h->setObservable(this);
if (h) {
h->setObservable(this);
}
}
void setAutoCamListener (AutoCamListener* acl) override
{