OTHER: Fix segmentation fault when setting volume
promoe segfaulted when disconnected and the user tried to set the volume fixes Ubuntu bug #455956
This commit is contained in:
parent
89a67e6bcc
commit
c37eb2950d
1 changed files with 4 additions and 0 deletions
|
@ -245,6 +245,8 @@ calcVolume (int volume, int balance)
|
|||
void
|
||||
XPlayback::setVolume (int new_volume)
|
||||
{
|
||||
if (!m_client->isConnected ()) return;
|
||||
|
||||
// Don't echo values the server sent us back to it
|
||||
if (m_volume == new_volume)
|
||||
return;
|
||||
|
@ -271,6 +273,8 @@ XPlayback::setVolume (int new_volume)
|
|||
void
|
||||
XPlayback::setBalance (int new_balance)
|
||||
{
|
||||
if (!m_client->isConnected ()) return;
|
||||
|
||||
// Don't echo values the server sent back to the server
|
||||
if ((m_balance == new_balance) || m_onechannel)
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue