[mutter] screen: Allow NULL out arguments in meta_screen_get_size



commit 079822c3f45488fd75e832a627e68a5989978556
Author: Tomeu Vizoso <tomeu vizoso collabora com>
Date:   Wed Aug 29 19:34:30 2012 +0200

    screen: Allow NULL out arguments in meta_screen_get_size

 src/core/screen.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index ea582b5..db9b5ed 100644
--- a/src/core/screen.c
+++ b/src/core/screen.c
@@ -3411,8 +3411,11 @@ meta_screen_get_size (MetaScreen *screen,
                       int        *width,
                       int        *height)
 {
-  *width = screen->rect.width;
-  *height = screen->rect.height;
+  if (width != NULL)
+    *width = screen->rect.width;
+
+  if (height != NULL)
+    *height = screen->rect.height;
 }
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]