Skip to content

Commit 4cfda33

Browse files
committed
fix compile crash
1 parent 40bd837 commit 4cfda33

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

image_view/src/nodelets/window_thread.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,18 @@
3535
#include <opencv2/highgui/highgui.hpp>
3636
#include <boost/thread.hpp>
3737

38+
namespace {
39+
void startWindowThreadLocal() {
40+
cv::startWindowThread();
41+
}
42+
}
43+
3844
namespace image_view {
3945

4046
void startWindowThread()
4147
{
4248
static boost::once_flag cv_thread_flag = BOOST_ONCE_INIT;
43-
boost::call_once(&cv::startWindowThread, cv_thread_flag);
49+
boost::call_once(&startWindowThreadLocal, cv_thread_flag);
4450
}
4551

4652
} // namespace image_view

0 commit comments

Comments
 (0)