Merge pull request #47571 from lucicam/master

Fix crash caused by null parameter passed to CameraServer.add_feed()
This commit is contained in:
Rémi Verschelde 2021-04-03 09:39:29 +02:00 committed by GitHub
commit 4a65e69296
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -99,6 +99,8 @@ Ref<CameraFeed> CameraServer::get_feed_by_id(int p_id) {
}; };
void CameraServer::add_feed(const Ref<CameraFeed> &p_feed) { void CameraServer::add_feed(const Ref<CameraFeed> &p_feed) {
ERR_FAIL_COND(p_feed.is_null());
// add our feed // add our feed
feeds.push_back(p_feed); feeds.push_back(p_feed);