diff options
author | Christian Persch <chpe@gnome.org> | 2010-05-09 23:30:11 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@gnome.org> | 2010-05-25 07:37:24 (GMT) |
commit | bf81d8f6045121a886dd37cde1e25c2e4e9da233 (patch) | |
tree | 1a1e8a045152fa0fea5c27731b5b4d2c874a4b4a | |
parent | 07da791141c9f3ce6ab83e63647cefbcc7f2ebe6 (diff) |
[shell] Safely get the screen from the message arguments
Check for out-of-bounds.
-rw-r--r-- | shell/ev-application.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/shell/ev-application.c b/shell/ev-application.c index a09906c..050b396 100644 --- a/shell/ev-application.c +++ b/shell/ev-application.c @@ -644,7 +644,9 @@ method_call_cb (GDBusConnection *connection, } g_variant_iter_free (iter); - if (display != NULL) + if (display != NULL && + screen_number >= 0 && + screen_number < gdk_display_get_n_screens (display)) screen = gdk_display_get_screen (display, screen_number); else screen = gdk_screen_get_default (); |