Don't crash when volume isn't available.
This commit is contained in:
parent
f4d010e59a
commit
0f06c83484
1 changed files with 5 additions and 0 deletions
|
@ -328,6 +328,11 @@ XMMSHandler::volume_changed (XMMSResult *res)
|
||||||
void
|
void
|
||||||
XMMSHandler::volume_get (XMMSResultDict *res)
|
XMMSHandler::volume_get (XMMSResultDict *res)
|
||||||
{
|
{
|
||||||
|
if (res->isError()) {
|
||||||
|
qWarning ("couldn't get volume levels!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QHash<QString, QString> h (DictToQHash (res));
|
QHash<QString, QString> h (DictToQHash (res));
|
||||||
QList<QString> Values = h.values();
|
QList<QString> Values = h.values();
|
||||||
QListIterator<QString> vol (Values);
|
QListIterator<QString> vol (Values);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue