Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 783ec680 authored by Valerie Hau's avatar Valerie Hau
Browse files

unlinkToDeath only when the listener has no more callbacks

Bug: N/A
Test: build, boot, SurfaceFlinger_test
Change-Id: I2bbca0f781897967a18731ade3a3b4724f16d361
parent 7618b235
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -310,8 +310,8 @@ void TransactionCompletedThread::threadMain() {
                    // we get pointers that compare unequal in the SF process.
                    interface_cast<ITransactionCompletedListener>(listenerStats.listener)
                            ->onTransactionCompleted(listenerStats);
                    listener->unlinkToDeath(mDeathRecipient);
                    if (transactionStatsDeque.empty()) {
                        listener->unlinkToDeath(mDeathRecipient);
                        completedTransactionsItr =
                                mCompletedTransactions.erase(completedTransactionsItr);
                    } else {