summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tracker-pt/ftnoir_tracker_pt.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp
index 88356771..c4ab5963 100644
--- a/tracker-pt/ftnoir_tracker_pt.cpp
+++ b/tracker-pt/ftnoir_tracker_pt.cpp
@@ -32,9 +32,13 @@ Tracker_PT::~Tracker_PT()
{
set_command(ABORT);
wait();
- delete video_widget;
+ if (video_widget)
+ delete video_widget;
video_widget = NULL;
- if (video_frame->layout()) delete video_frame->layout();
+ if (video_frame)
+ {
+ if (video_frame->layout()) delete video_frame->layout();
+ }
// fast start/stop causes breakage
portable::sleep(1000);
camera.stop();