libfreenect/libfreenect-0.5.3-noabort.patch
Rich Mattes dde914a82a Update to release 0.5.3 (rhbz#1272803)
- Fix rawhide FTBFS (rhbz#1307722)
- Patch freenct-cppview to catch exception when no freenect device is present (rhbz#1310356)
2016-02-21 12:00:41 -05:00

19 lines
669 B
Diff

diff -up ./wrappers/cpp/cppview.cpp.noabort ./wrappers/cpp/cppview.cpp
--- ./wrappers/cpp/cppview.cpp.noabort 2016-02-21 11:03:00.653334752 -0500
+++ ./wrappers/cpp/cppview.cpp 2016-02-21 11:04:51.022655752 -0500
@@ -348,7 +348,13 @@ void *gl_threadfunc(void *arg)
}
int main(int argc, char **argv) {
- device = &freenect.createDevice<MyFreenectDevice>(0);
+ try {
+ device = &freenect.createDevice<MyFreenectDevice>(0);
+ }
+ catch (std::exception &e) {
+ std::cerr << std::endl << "Exception starting Freenect device : " << e.what() << std::endl;
+ exit(1);
+ }
device->startVideo();
device->startDepth();
gl_threadfunc(NULL);