assert()s.
authorCarl Hetherington <cth@carlh.net>
Wed, 9 Apr 2014 10:35:12 +0000 (11:35 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 9 Apr 2014 10:35:12 +0000 (11:35 +0100)
src/lib/dcpomatic_time.h

index 59986e6d892994787301325b7a4fc15316d89911..76fbe690275b071b1793cb21f15a134331f83956 100644 (file)
@@ -135,6 +135,7 @@ public:
 
        template <class T>
        static ContentTime from_frames (int64_t f, T r) {
+               assert (r > 0);
                return ContentTime (f * HZ / r);
        }
 
@@ -214,6 +215,7 @@ public:
 
        template <class T>
        static DCPTime from_frames (int64_t f, T r) {
+               assert (r > 0);
                return DCPTime (f * HZ / r);
        }