diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-01-06 19:06:58 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2009-01-06 19:06:58 +0000 |
| commit | 3cc0b2fa0f81e2ee09c3ae3d92d31c88ac5b9b6b (patch) | |
| tree | 85fcb87a6382f6b1503449b96a6bda76d3a9a638 /src/plugins/General | |
| parent | 46541b406411ca71e0b676f4f5cee073da124ced (diff) | |
| download | qmmp-3cc0b2fa0f81e2ee09c3ae3d92d31c88ac5b9b6b.tar.gz qmmp-3cc0b2fa0f81e2ee09c3ae3d92d31c88ac5b9b6b.tar.bz2 qmmp-3cc0b2fa0f81e2ee09c3ae3d92d31c88ac5b9b6b.zip | |
fixed division by zero
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@740 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/General')
| -rw-r--r-- | src/plugins/General/statusicon/qmmptrayicon.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/General/statusicon/qmmptrayicon.cpp b/src/plugins/General/statusicon/qmmptrayicon.cpp index 1d8605af5..21038749e 100644 --- a/src/plugins/General/statusicon/qmmptrayicon.cpp +++ b/src/plugins/General/statusicon/qmmptrayicon.cpp @@ -50,7 +50,7 @@ void QmmpTrayIcon::wheelEvent(QWheelEvent *e) { SoundCore *core = SoundCore::instance(); int volume = qMax(core->leftVolume(), core->rightVolume()); - int balance = (core->rightVolume() - core->leftVolume()) * 100 / volume; + int balance = volume ? (core->rightVolume() - core->leftVolume()) * 100 / volume : volume; volume += e->delta()/20; volume = qMax(volume,0); volume = qMin(volume,100); |
