Ticket #10740: 0001-libmythui-Fix-an-assert-failure-in-Qt-when-playing-a.patch

File 0001-libmythui-Fix-an-assert-failure-in-Qt-when-playing-a.patch, 1.2 KB (added by Lawrence Rust <lvr@…>, 12 years ago)
  • mythtv/libs/libmythui/mythuitype.cpp

    From 26fd248dffccce7a8bb3fbdebd7125499a5150c5 Mon Sep 17 00:00:00 2001
    From: Lawrence Rust <lvr@softsystem.co.uk>
    Date: Sat, 19 May 2012 17:24:53 +0200
    Subject: [PATCH] libmythui: Fix an assert failure in Qt when playing a video
    
    Trying to play a DVD with a debug build of the Qt library results in
    this assertion failure:
    ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to objects owned by a different thread. Current thread a8625e78. Receiver 'aa_OSD_SUBTITLES' (of type 'MythScreenType') was created in thread 9890750", file kernel/qcoreapplication.cpp, line 349
    
    Changing the delete to deleteLater fixes the problem.
    
    Signed-off-by: Lawrence Rust <lvr@softsystem.co.uk>
    ---
     mythtv/libs/libmythui/mythuitype.cpp |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/mythtv/libs/libmythui/mythuitype.cpp b/mythtv/libs/libmythui/mythuitype.cpp
    index ebd5235..000b4da 100644
    a b void MythUIType::DeleteAllChildren(void) 
    217217
    218218    for (it = m_ChildrenList.begin(); it != m_ChildrenList.end(); ++it)
    219219        if (*it)
    220             delete *it;
     220            (*it)->deleteLater();
    221221
    222222    m_ChildrenList.clear();
    223223}