background: Fix monitor validation in get_texture()

Monitor indexes should be in the range [0, n], not [-1, 0] :-)
This commit is contained in:
Florian Müllner 2014-09-06 18:21:20 +02:00
parent 24119b8a9c
commit 9be3e56b70

View File

@ -679,7 +679,7 @@ meta_background_get_texture (MetaBackground *self,
g_return_val_if_fail (META_IS_BACKGROUND (self), NULL); g_return_val_if_fail (META_IS_BACKGROUND (self), NULL);
priv = self->priv; priv = self->priv;
g_return_val_if_fail (monitor_index <= 0 && monitor_index < priv->n_monitors, NULL); g_return_val_if_fail (monitor_index >= 0 && monitor_index < priv->n_monitors, NULL);
monitor = &priv->monitors[monitor_index]; monitor = &priv->monitors[monitor_index];