diff options
Diffstat (limited to 'src/display.c')
-rw-r--r-- | src/display.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/display.c b/src/display.c index bf3cef5e..ccc82e85 100644 --- a/src/display.c +++ b/src/display.c @@ -1287,6 +1287,10 @@ meta_display_get_workspace_by_index (MetaDisplay *display, int index) { GList *tmp; + + /* should be robust, index is maybe from an app */ + if (index < 0) + return NULL; tmp = g_list_nth (display->workspaces, index); @@ -1304,6 +1308,10 @@ meta_display_get_workspace_by_screen_index (MetaDisplay *display, GList *tmp; int i; + /* should be robust, index is maybe from an app */ + if (index < 0) + return NULL; + i = 0; tmp = display->workspaces; while (tmp != NULL) |