From fe1885f2838f26d2126f9e3287c826db39e0b7e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 1 Jul 2007 15:51:42 +0000 Subject: [PATCH] Fixed a stupid copy&paste bug; one version of Translate() did not lock the private translator handle - and therefore ran into a debugger call. Was triggered by WonderBrush's export function. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21538 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/translation/TranslatorRoster.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/kits/translation/TranslatorRoster.cpp b/src/kits/translation/TranslatorRoster.cpp index b9bb037469..3736a89a4b 100644 --- a/src/kits/translation/TranslatorRoster.cpp +++ b/src/kits/translation/TranslatorRoster.cpp @@ -1536,6 +1536,9 @@ BTranslatorRoster::Translate(translator_id id, BPositionIO* source, if (source == NULL || destination == NULL) return B_BAD_VALUE; + if (!fPrivate->Lock()) + return B_ERROR; + BTranslator* translator = fPrivate->FindTranslator(id); if (translator != NULL) { translator->Acquire();