From: Uwe Hermann Date: Thu, 1 Jan 2015 19:43:53 +0000 (+0100) Subject: Fix an isnan() issue on (at least) MinGW and Mac OS X. X-Git-Tag: pulseview-0.3.0~283 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=f9abacf20c85;p=pulseview.git Fix an isnan() issue on (at least) MinGW and Mac OS X. This closes bug #531. --- diff --git a/pv/view/viewport.cpp b/pv/view/viewport.cpp index 6b85e1b7..d9be32c9 100644 --- a/pv/view/viewport.cpp +++ b/pv/view/viewport.cpp @@ -82,7 +82,8 @@ void Viewport::drag() void Viewport::drag_by(const QPoint &delta) { - if (isnan(drag_offset_)) + // Use std::isnan() instead of isnan(), the latter can cause issues. + if (std::isnan(drag_offset_)) return; view_.set_scale_offset(view_.scale(), drag_offset_ -