Don't crash when unable to create source. erase will call the desctructor. Fixes #3344
This commit is contained in:
parent
38cda24b53
commit
c5f4623104
|
@ -269,9 +269,8 @@ int main(int argc, char *argv[]) {
|
|||
Warning("Unknown format in %s", videoFifoPath.c_str());
|
||||
}
|
||||
if (videoSource == nullptr) {
|
||||
Error("Unable to create source");
|
||||
Error("Unable to create source for %s", videoFifoPath.c_str());
|
||||
rtspServer->RemoveSession(sessions[monitor->Id()]->GetMediaSessionId());
|
||||
delete sessions[monitor->Id()];
|
||||
sessions.erase(monitor->Id());
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue