diff --git a/src/core/screen.c b/src/core/screen.c index ea582b5de..db9b5ed53 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; } /**