Commit 1cb0f4c6 authored by Jason Wood's avatar Jason Wood

Added some redundant checks to make sure the referenced avfile actually exists.

svn path=/trunk/kdenlive/; revision=327
parent ffc5da4f
......@@ -38,18 +38,28 @@ DocClipAVFile::DocClipAVFile(KdenliveDoc *doc, AVFile *avFile) :
DocClipBase(doc),
m_avfile(avFile)
{
m_avfile->addReference(this);
if(m_avfile)
{
m_avfile->addReference(this);
}
else
{
kdError() << "Error - creating DocClipAVFile passing avfile as NULL" << endl;
}
setTrackEnd(trackStart() + duration());
setName(m_avfile->name());
m_clipType = AV;
m_clipType = AV;
}
DocClipAVFile::~DocClipAVFile()
{
m_avfile->removeReference(this);
m_avfile = 0;
if(m_avfile)
{
m_avfile->removeReference(this);
m_avfile = 0;
}
}
GenTime DocClipAVFile::duration() const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment