SNI: Fix pixmap

g_variant_iter_n_children apparently returns 1 instead of 3 (array =
child, but I don't know).
I inverted the statement, because for empty property, it hasn't any
children.
This commit is contained in:
scorpion-26 2023-08-23 23:18:50 +02:00
parent 15ed9bfc66
commit 383f25dbe1

View file

@ -90,7 +90,7 @@ namespace SNI
GVariantIter* arrIter = nullptr; GVariantIter* arrIter = nullptr;
g_variant_get(arr, "a(iiay)", &arrIter); g_variant_get(arr, "a(iiay)", &arrIter);
if (g_variant_iter_n_children(arrIter) == 3) if (g_variant_iter_n_children(arrIter) != 0)
{ {
int width; int width;
int height; int height;
@ -125,10 +125,10 @@ namespace SNI
} }
g_variant_iter_free(data); g_variant_iter_free(data);
g_variant_iter_free(arrIter);
hasPixmap = true; hasPixmap = true;
} }
g_variant_iter_free(arrIter);
g_variant_unref(arr); g_variant_unref(arr);
g_variant_unref(iconPixmap); g_variant_unref(iconPixmap);
} }