Fix BHandler::GetSupportedSuites()
The logic was reversed accidentally in hrev47355 Rewrite the method to make more sense. If data is NULL return B_BAD_VALUE right away. Otherwise set the status based on the first operation, if that succeeds perform a second one, and return the result. Fixes CID 1222666
This commit is contained in:
parent
edc845a323
commit
2776568d27
@ -510,19 +510,16 @@ BMessage: what = (0x0, or 0)
|
||||
property_info array is declared in the globals section.
|
||||
*/
|
||||
|
||||
status_t err = B_OK;
|
||||
if (data == NULL)
|
||||
err = B_BAD_VALUE;
|
||||
return B_BAD_VALUE;
|
||||
|
||||
if (err != B_OK) {
|
||||
err = data->AddString("suites", "suite/vnd.Be-handler");
|
||||
if (err != B_OK) {
|
||||
status_t result = data->AddString("suites", "suite/vnd.Be-handler");
|
||||
if (result == B_OK) {
|
||||
BPropertyInfo propertyInfo(sHandlerPropInfo);
|
||||
err = data->AddFlat("messages", &propertyInfo);
|
||||
}
|
||||
result = data->AddFlat("messages", &propertyInfo);
|
||||
}
|
||||
|
||||
return err;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user