Clementine-audio-player-Mac.../src/moodbar
Simon Marchi 725e1d8f0d moodbar: check QSlider max/min before using them in division
When switching playback from an item for which the moodbar is not
displayed (e.g. an internet stream), to an item for which it is
displayed (e.g. a local mp3 file), Clementine sometimes crashes.

This happens because the slider_opt->maximum and slider_opt->minimum
have the value 0 (their default value), and the difference is used as a
divisor.  This gives a division by 0, and a SIGFPE.

This problem has been fixed in commit af42cce.  However, when a9f9b0e
reverted 3f79fa5, a little to much was reverted and we lost what af42cce
did.  This patch re-introduces the fix.

Fixes #5261

moodbar: Add comment
2016-02-18 09:15:44 -05:00
..
moodbarbuilder.cpp Make format after update to avoid conflicts 2014-10-15 21:57:57 +02:00
moodbarbuilder.h Rewrite moodbar stuff for gstreamer-1.0: 2014-09-21 19:38:13 +10:00
moodbarcontroller.cpp Sort children is recursive and will mess up services' children (e.g. search 2014-12-27 00:33:23 +01:00
moodbarcontroller.h Use nullptr as parent parameter default everywhere 2014-02-10 16:03:54 +01:00
moodbaritemdelegate.cpp Remove most usages of QFutureWatcher 2015-11-27 14:28:12 +00:00
moodbaritemdelegate.h Remove most usages of QFutureWatcher 2015-11-27 14:28:12 +00:00
moodbarloader.cpp Include windows.h 2015-08-11 15:15:26 -03:00
moodbarloader.h Use nullptr as parent parameter default everywhere 2014-02-10 16:03:54 +01:00
moodbarpipeline.cpp Fix socket leak in moodbarpipeline 2014-12-22 16:13:44 -05:00
moodbarpipeline.h Rewrite moodbar stuff for gstreamer-1.0: 2014-09-21 19:38:13 +10:00
moodbarproxystyle.cpp moodbar: check QSlider max/min before using them in division 2016-02-18 09:15:44 -05:00
moodbarproxystyle.h Avoiding usage of pixelMetric because it breaks on non-Oxygen styling 2015-12-14 07:16:30 +05:00
moodbarrenderer.cpp Fix some bad sizeof -> arraysize changes from revision 41e9c15248. 2014-05-23 21:31:50 +10:00
moodbarrenderer.h Reformat all non-3rd-party C/C++/Objective-C++. 2014-02-07 16:34:20 +01:00