https://bugzilla.novell.com/show_bug.cgi?id=219356 wstephenson@novell.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|coolo@novell.com |wstephenson@novell.com ------- Comment #32 from wstephenson@novell.com 2006-11-13 10:31 MST ------- QString libhal_device_get_property_QString(LibHalContext *ctx, const char* udi, const char *key) { if (udi == 0 || !strlen(udi)) return QString(); Danny: As you can see, we do check for a null returned from libhal_device_get_property_string, but it still crashes unless we check for the existence of the property first. I could put that check into libhal_device_get_property_QString() but this causes another dbus roundtrip, right? If I can do the lightweight check ( 1. in #26 ) I would prefer this. Is your second suggestion actually the only way to do this safely, or is the assert in dbus when getting unknown properties really that aggressive? CODE: char* _ppt_string; QString _ppt_QString; DBusError error; _ppt_string = libhal_device_get_property_string(ctx, udi, key, &error); if (_ppt_string) _ppt_QString = _ppt_string; libhal_free_string(_ppt_string); return _ppt_QString; } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.