Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorChristian 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)
commitbf81d8f6045121a886dd37cde1e25c2e4e9da233 (patch)
tree1a1e8a045152fa0fea5c27731b5b4d2c874a4b4a /shell
parent07da791141c9f3ce6ab83e63647cefbcc7f2ebe6 (diff)
[shell] Safely get the screen from the message arguments
Check for out-of-bounds.
Diffstat (limited to 'shell')
-rw-r--r--shell/ev-application.c4
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 ();