Fix crash when there are no ports at all.
git-svn-id: file:///home/vcs/svn/jsweeper/trunk@45 6611ac79-6612-48ef-a1e9-b906f853523emaster
parent
caa3daeb5e
commit
4cad6b8ff8
|
@ -42,11 +42,13 @@ void PortManager::Refresh()
|
||||||
|
|
||||||
const char **ports = jack_get_ports(client, NULL, NULL, 0);
|
const char **ports = jack_get_ports(client, NULL, NULL, 0);
|
||||||
|
|
||||||
for (int i = 0; ports[i] != NULL; ++i) {
|
if (ports != NULL) {
|
||||||
Add(jack_port_by_name(client, ports[i]));
|
for (int i = 0; ports[i] != NULL; ++i) {
|
||||||
}
|
Add(jack_port_by_name(client, ports[i]));
|
||||||
|
}
|
||||||
|
|
||||||
jack_free(ports);
|
jack_free(ports);
|
||||||
|
}
|
||||||
|
|
||||||
RefreshConnections();
|
RefreshConnections();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue