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:
@@ -1060,7 +1060,9 @@ BMimeType::GetInstalledTypes(const char *supertype, BMessage *types)
|
|||||||
// Build and send the message, read the reply
|
// Build and send the message, read the reply
|
||||||
|
|
||||||
BMessage msg(B_REG_MIME_GET_INSTALLED_TYPES);
|
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)
|
if (!err)
|
||||||
err = BRoster::Private().SendTo(&msg, types, true);
|
err = BRoster::Private().SendTo(&msg, types, true);
|
||||||
if (!err)
|
if (!err)
|
||||||
|
|||||||
Reference in New Issue
Block a user