Skip to content

Commit 6fafc25

Browse files
committed
More complete checking of Registration::apply() arguments:
depth pointer is dereferenced afterwards and therefore should be controlled
1 parent ce025f6 commit 6fafc25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/protonect/src/registration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void Registration::apply( int dx, int dy, float dz, float& cx, float &cy) const
8787
void Registration::apply(const Frame *rgb, const Frame *depth, Frame *undistorted, Frame *registered, const bool enable_filter) const
8888
{
8989
// Check if all frames are valid and have the correct size
90-
if (!undistorted || !rgb || !registered ||
90+
if (!rgb || !depth || !undistorted || !registered ||
9191
rgb->width != 1920 || rgb->height != 1080 || rgb->bytes_per_pixel != 4 ||
9292
depth->width != 512 || depth->height != 424 || depth->bytes_per_pixel != 4 ||
9393
undistorted->width != 512 || undistorted->height != 424 || undistorted->bytes_per_pixel != 4 ||

0 commit comments

Comments
 (0)