Skip to content

Commit 67a88e9

Browse files
author
Giacomo Dabisias
committed
fixes memory deallocation
1 parent 6bf7b8e commit 67a88e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/registration.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void Registration::apply(const Frame *rgb, const Frame *depth, Frame *undistorte
248248
*registered_data = c_off < 0 ? 0 : *(rgb_data + c_off);
249249
}
250250
}
251-
delete[] depth_to_c_off;
251+
if (!color_depth_map) delete[] depth_to_c_off;
252252
}
253253

254254
/**

0 commit comments

Comments
 (0)