diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2008-06-13 12:23:03 -0600 |
---|---|---|
committer | Matthieu Herrb <matthieu@bluenote.herrb.net> | 2008-06-13 12:27:16 -0600 |
commit | 0fbda267334eb531b7153c3b9035fe7470302e13 (patch) | |
tree | cd71edbd6f968cccd042833fea312c4dc558d379 | |
parent | 53743925d1067b830dd80f9193444f5799f55e28 (diff) |
Don't print '(null)' when XF86VidModeGetMonitor() returns NULL fields.
-rw-r--r-- | xdpyinfo.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -778,7 +778,9 @@ print_XF86VidMode_info(Display *dpy, char *extname) if (!XF86VidModeGetMonitor(dpy, DefaultScreen(dpy), &monitor)) return 0; printf(" Monitor Information:\n"); - printf(" Vendor: %s, Model: %s\n", monitor.vendor, monitor.model); + printf(" Vendor: %s, Model: %s\n", + monitor.vendor == NULL ? "" : monitor.vendor, + monitor.model == NULL ? "" : monitor.model); printf(" Num hsync: %d, Num vsync: %d\n", monitor.nhsync, monitor.nvsync); for (i = 0; i < monitor.nhsync; i++) { printf(" hsync range %d: %6.2f - %6.2f\n", i, monitor.hsync[i].lo, |