libnm-core: fix a crash in priority_strv_to_maplist()

strv can be NULL.

Reproducer:
$ nmcli con mod my-vlan vlan.ingress 1:5

(cherry picked from commit 71c8c2e587)
This commit is contained in:
Jiří Klimeš 2015-09-01 16:06:54 +02:00
parent 7ac3b75f42
commit 7cfd6fc641

View file

@ -565,7 +565,7 @@ priority_strv_to_maplist (NMVlanPriorityMap map, char **strv)
GSList *list = NULL;
int i;
for (i = 0; strv[i]; i++) {
for (i = 0; strv && strv[i]; i++) {
PriorityMap *item;
item = priority_map_new_from_str (map, strv[i]);