Fixed bug that caused programs to crash when the default BTranslatorRoster is deleted, then the default BTranslatorRoster is used again
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1015 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2be429a65d
commit
76bfea45a3
@ -180,6 +180,12 @@ BTranslatorRoster::~BTranslatorRoster()
|
|||||||
{
|
{
|
||||||
if (fSem > 0 && acquire_sem(fSem) == B_NO_ERROR) {
|
if (fSem > 0 && acquire_sem(fSem) == B_NO_ERROR) {
|
||||||
|
|
||||||
|
// If the default BTranslatorRoster is being
|
||||||
|
// deleted, set the pointer to the default
|
||||||
|
// BTranslatorRoster to NULL
|
||||||
|
if (fspDefaultTranslators == this)
|
||||||
|
fspDefaultTranslators = NULL;
|
||||||
|
|
||||||
// FIRST PASS: release BTranslator objects
|
// FIRST PASS: release BTranslator objects
|
||||||
translator_node *pTranNode = fpTranslators;
|
translator_node *pTranNode = fpTranslators;
|
||||||
while (pTranNode) {
|
while (pTranNode) {
|
||||||
|
Loading…
Reference in New Issue
Block a user