Fix sample track playback crash (#4586)

Fixes double-freeing `AudioPort` which is a regression in #4310.

Co-authored-by: Shmuel H <shmuelhazan0@gmail.com>
Co-authored-by: Hyunjin Song <tteu.ingog@gmail.com>
This commit is contained in:
Z3R0C
2018-09-18 04:21:45 +02:00
committed by Hyunjin Song
parent 78142cee3d
commit 00cc6dc22b
2 changed files with 11 additions and 8 deletions

View File

@@ -1,8 +1,9 @@
/*
* SamplePlayHandle.h - play-handle for playing a sample
*
* Copyright (c) 2005-2014 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
*
* This file is part of LMMS - https://lmms.io
*
* This program is free software; you can redistribute it and/or
@@ -38,7 +39,7 @@ class AudioPort;
class SamplePlayHandle : public PlayHandle
{
public:
SamplePlayHandle( SampleBuffer* sampleBuffer );
SamplePlayHandle( SampleBuffer* sampleBuffer , bool ownAudioPort = true );
SamplePlayHandle( const QString& sampleFile );
SamplePlayHandle( SampleTCO* tco );
virtual ~SamplePlayHandle();