summaryrefslogtreecommitdiff
path: root/src/core/screen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/screen.c')
-rw-r--r--src/core/screen.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/screen.c b/src/core/screen.c
index 6ba2e68c..737c6052 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -392,6 +392,8 @@ int
meta_screen_monitor_index_to_xinerama_index (MetaScreen *screen,
int index)
{
+ g_return_val_if_fail (index >= 0 && index < screen->n_monitor_infos, -1);
+
meta_screen_ensure_xinerama_indices (screen);
return screen->monitor_infos[index].xinerama_index;