diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-02 00:23:11 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2019-03-02 00:23:11 +0100 |
commit | f5ce4029d6f5c0659eba8dedbd5238527867460b (patch) | |
tree | f7df2f38352a7683f63964f329d103d30927fcc7 /tracker-pt/ftnoir_tracker_pt.cpp | |
parent | e842451d8e8f77f2ab2b4537d4619611b61c8c48 (diff) |
tracker/pt: avoid float division by zero
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt.cpp')
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt.cpp b/tracker-pt/ftnoir_tracker_pt.cpp index c3b6c6e3..3854e531 100644 --- a/tracker-pt/ftnoir_tracker_pt.cpp +++ b/tracker-pt/ftnoir_tracker_pt.cpp @@ -101,7 +101,8 @@ void Tracker_PT::run() Affine X_GH = X_CM * X_MH; vec3 p = X_GH.t; // head (center?) position in global space - preview_frame->draw_head_center((p[0] * fx) / p[2], (p[1] * fx) / p[2]); + if (p[2] > f(.1)) + preview_frame->draw_head_center((p[0] * fx) / p[2], (p[1] * fx) / p[2]); widget->update_image(preview_frame->get_bitmap()); { |