diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-24 17:58:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-24 17:58:25 +0200 |
commit | 1db47a7b305624eda9af6375a09550c474d5d74b (patch) | |
tree | a4066eb5c110a35ee657d41c1a9906331b518058 /ftnoir_tracker_pt/video_widget.h | |
parent | da9bc9bb5438002e9711720e2446bf6e4d47e386 (diff) |
Prevent a crash from happening, apply defensive coding against races with camera start
Diffstat (limited to 'ftnoir_tracker_pt/video_widget.h')
-rw-r--r-- | ftnoir_tracker_pt/video_widget.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ftnoir_tracker_pt/video_widget.h b/ftnoir_tracker_pt/video_widget.h index 2425603b..bb567478 100644 --- a/ftnoir_tracker_pt/video_widget.h +++ b/ftnoir_tracker_pt/video_widget.h @@ -22,7 +22,7 @@ class VideoWidget : public QGLWidget Q_OBJECT
public:
- VideoWidget(QWidget *parent) : QGLWidget(parent) {
+ VideoWidget(QWidget *parent) : QGLWidget(parent), mtx() {
#if !defined(_WIN32)
setAttribute(Qt::WA_NativeWindow, true);
#endif
@@ -41,9 +41,9 @@ private: cv::Mat frame;
QImage qframe;
QImage resized_qframe;
+ QMutex mtx;
std::auto_ptr< std::vector<cv::Vec2f> > points;
- QMutex mtx;
};
#endif // VIDEOWIDGET_H
|