[mythtv] RE: mythtv commit: r7336 by danielk

Christian Höhle Christian at FamilieHoehle.de
Wed Sep 28 14:24:24 UTC 2005


tfw may be null if the file is not opened cleanly (see both constructors
of RingBuffer). The other locations that may need some validity checks
are done with the attached patch.

Cheers,
Chris
-------------- next part --------------
Index: mythtv/libs/libmythtv/RingBuffer.cpp
===================================================================
--- mythtv/libs/libmythtv/RingBuffer.cpp	(Revision 7336)
+++ mythtv/libs/libmythtv/RingBuffer.cpp	(Arbeitskopie)
@@ -1523,12 +1523,12 @@
 
 void RingBuffer::SetWriteBufferSize(int newSize)
 {
-    tfw->SetWriteBufferSize(newSize);
+    if (tfw) tfw->SetWriteBufferSize(newSize);
 }
 
 void RingBuffer::SetWriteBufferMinWriteSize(int newMinSize)
 {
-    tfw->SetWriteBufferMinWriteSize(newMinSize);
+    if (tfw) tfw->SetWriteBufferMinWriteSize(newMinSize);
 }
 
 long long RingBuffer::GetFreeSpace(void)


More information about the mythtv-dev mailing list