BMimeType::GetInstalledTypes() will no longer try to add a NULL string to a

message - and even return the error message it got from BMessage::AddString()
for trying so.
This fixes bug #585.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17671 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-05-31 17:16:17 +00:00
parent 194b7064ee
commit f998d2977d

View File

@ -1060,7 +1060,9 @@ BMimeType::GetInstalledTypes(const char *supertype, BMessage *types)
// Build and send the message, read the reply
BMessage msg(B_REG_MIME_GET_INSTALLED_TYPES);
status_t err = msg.AddString("supertype", supertype);
status_t err = B_OK;
if (supertype != NULL)
err = msg.AddString("supertype", supertype);
if (!err)
err = BRoster::Private().SendTo(&msg, types, true);
if (!err)