From 53b3f3cbc7f1bd2aa3708beaed57487c8685b436 Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Tue, 11 Mar 2014 16:04:42 +0100 Subject: [PATCH 4/4] don't emit backendchanged when we have no backend otherwise certain call chains might cause an infinite loop where it would attempt to construct a backend to get devices which triggers a rebuild of the device cache which in turn tries to access the backend... --- phonon/factory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phonon/factory.cpp b/phonon/factory.cpp index 1e081bb..4386108 100644 --- a/phonon/factory.cpp +++ b/phonon/factory.cpp @@ -572,7 +572,9 @@ QObject *Factory::backend(bool createWhenNull) // XXX: might create "reentrancy" problems: // a method calls this method and is called again because the // backendChanged signal is emitted - emit globalFactory->backendChanged(); + if (globalFactory->m_backendObject) { + emit globalFactory->backendChanged(); + } } return globalFactory->m_backendObject; } -- 1.8.5.3