From 95b0c827d1a90b9809c30779655439160cb9c1a6 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Fri, 21 May 2010 12:57:01 +0200 Subject: [PATCH] InlineAutomation: delete attached AutomationPattern immediately It was not safe to immediately delete the AutomationPattern attached to an InlineAutomation object before commit "InlineAutomation: delete attached AutomationPattern immediately" as the AutomationPattern destructor sometimes fiddles around with AutomationEditor (GUI!). However this has changed now and this enables us to delete the AutomationPattern immediately. This fixes some random crashes with scheduling AutomationPatterns for later deletion. Closes #2982696. (cherry picked from commit a9abdc3e7550d6e064bca53b2adf7e54e1fe9ca6) --- include/inline_automation.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/include/inline_automation.h b/include/inline_automation.h index 4a851b680..6c4d5ea21 100644 --- a/include/inline_automation.h +++ b/include/inline_automation.h @@ -1,8 +1,8 @@ /* * inline_automation.h - class for automating something "inline" * - * Copyright (c) 2008 Tobias Doerffel - * + * Copyright (c) 2008-2010 Tobias Doerffel + * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * * This program is free software; you can redistribute it and/or @@ -22,7 +22,6 @@ * */ - #ifndef _INLINE_AUTOMATION_H #define _INLINE_AUTOMATION_H @@ -44,7 +43,7 @@ public: { if( m_autoPattern ) { - m_autoPattern->deleteLater(); + delete m_autoPattern; } } @@ -65,7 +64,7 @@ public: m_autoPattern = new automationPattern( NULL ); m_autoPattern->addObject( this ); } - return( m_autoPattern ); + return m_autoPattern; } virtual void saveSettings( QDomDocument & _doc, QDomElement & _parent );