mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
Allow Sink.SetSource() to be given an empty source.
In Java, allow source to be null (pointers are not used in C++, so this isn't necessary).
This commit is contained in:
@@ -84,7 +84,11 @@ public class VideoSink {
|
||||
/// provide frames to multiple clients.
|
||||
/// @param source Source
|
||||
public void setSource(VideoSource source) {
|
||||
CameraServerJNI.setSinkSource(m_handle, source.m_handle);
|
||||
if (source == null) {
|
||||
CameraServerJNI.setSinkSource(m_handle, 0);
|
||||
} else {
|
||||
CameraServerJNI.setSinkSource(m_handle, source.m_handle);
|
||||
}
|
||||
}
|
||||
|
||||
/// Get the connected source.
|
||||
|
||||
Reference in New Issue
Block a user