From 5e7c1a3a03269b5088b26ecf9c676518d65a05e4 Mon Sep 17 00:00:00 2001 From: "Leandro A. F. Pereira" Date: Sun, 19 Nov 2006 19:38:31 +0000 Subject: Run hardinfo with the '-r' command-line parameter and you'll get a report in standard output. :) --- hardinfo2/arch/common/display.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'hardinfo2/arch/common/display.h') diff --git a/hardinfo2/arch/common/display.h b/hardinfo2/arch/common/display.h index 6731e3e3..b28d34cc 100644 --- a/hardinfo2/arch/common/display.h +++ b/hardinfo2/arch/common/display.h @@ -126,9 +126,13 @@ computer_get_display(void) DisplayInfo *di = g_new0(DisplayInfo, 1); GdkScreen *screen = gdk_screen_get_default(); - - di->width = gdk_screen_get_width(screen); - di->height = gdk_screen_get_height(screen); + + if (screen) { + di->width = gdk_screen_get_width(screen); + di->height = gdk_screen_get_height(screen); + } else { + di->width = di->height = 0; + } get_glx_info(di); get_x11_info(di); -- cgit v1.2.3