From 7f8de0710ace203ab7bc78ea0d809d977ba9ca13 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sat, 23 Jun 2012 21:49:21 -0700 Subject: [PATCH] Mixer: Fix divide by zero in DPM. --- mixer/src/DPM.C | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mixer/src/DPM.C b/mixer/src/DPM.C index d193a75..3d7d0a9 100644 --- a/mixer/src/DPM.C +++ b/mixer/src/DPM.C @@ -114,6 +114,8 @@ DPM::resize ( int X, int Y, int W, int H ) void DPM::draw ( void ) { + if ( !_segments ) + return; snprintf( peak_string, sizeof( peak_string ), "%.1f", peak() ); tooltip( peak_string );