mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
When HAL returns a NULL property, print "(null)" instead of a NULL pointer
They've promised to fix Solaris printf soon to check for NULL pointers instead of segfaulting, but that won't help people on existing releases.
This commit is contained in:
@@ -120,7 +120,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name)
|
||||
char *prop, *ret;
|
||||
|
||||
prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL);
|
||||
LogMessageVerb(X_INFO, 10, "config/hal: getting %s on %s returned %s\n", name, udi, prop);
|
||||
LogMessageVerb(X_INFO, 10, "config/hal: getting %s on %s returned %s\n", name, udi, prop ? prop : "(null)");
|
||||
if (prop) {
|
||||
ret = xstrdup(prop);
|
||||
libhal_free_string(prop);
|
||||
|
||||
Reference in New Issue
Block a user