Use the right value as id for the BTranslatorRoster call.
The loop counter was used as the id directly instead of using it as the index into the translator_id array.
This commit is contained in:
@@ -222,7 +222,8 @@ Utility::_GetMimeString(uint32 imageType) const
|
|||||||
const translation_format* formats = NULL;
|
const translation_format* formats = NULL;
|
||||||
int32 numFormats;
|
int32 numFormats;
|
||||||
|
|
||||||
if (roster->GetOutputFormats(x, &formats, &numFormats) == B_OK) {
|
if (roster->GetOutputFormats(translators[x], &formats, &numFormats)
|
||||||
|
== B_OK) {
|
||||||
for (int32 i = 0; i < numFormats; ++i) {
|
for (int32 i = 0; i < numFormats; ++i) {
|
||||||
if (formats[i].type == imageType) {
|
if (formats[i].type == imageType) {
|
||||||
delete [] translators;
|
delete [] translators;
|
||||||
|
|||||||
Reference in New Issue
Block a user