summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kristjansson <danielk@cuymedia.net>2011-07-26 01:44:45 (GMT)
committer Daniel Kristjansson <danielk@cuymedia.net>2011-07-26 13:23:55 (GMT)
commit23305b9ca1195f65c3c4f6ebe49e730522dafcaa (patch)
treea642bd2c4b2600ed4a2f8a38d7dcde7ce412caa2
parent56350fb1adcbe7c90c8db41dda60797e023f9592 (diff)
Make sure DeviceReadBuffer::videodevice is never QString::null, this will cause the logging to segfault.
-rw-r--r--mythtv/libs/libmythtv/DeviceReadBuffer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/mythtv/libs/libmythtv/DeviceReadBuffer.cpp b/mythtv/libs/libmythtv/DeviceReadBuffer.cpp
index cce5732..8c7128b 100644
--- a/mythtv/libs/libmythtv/DeviceReadBuffer.cpp
+++ b/mythtv/libs/libmythtv/DeviceReadBuffer.cpp
@@ -18,7 +18,7 @@ using namespace std;
#define LOC_ERR QString("DevRdB(%1) Error: ").arg(videodevice)
DeviceReadBuffer::DeviceReadBuffer(ReaderPausedCB *cb, bool use_poll)
- : videodevice(QString::null), _stream_fd(-1),
+ : videodevice(""), _stream_fd(-1),
readerPausedCB(cb),
// Data for managing the device ringbuffer
@@ -53,6 +53,7 @@ bool DeviceReadBuffer::Setup(const QString &streamName, int streamfd)
delete[] buffer;
videodevice = streamName;
+ videodevice = (videodevice == QString::null) ? "" : videodevice;
_stream_fd = streamfd;
// BEGIN HACK -- see #6897
@@ -124,6 +125,7 @@ void DeviceReadBuffer::Reset(const QString &streamName, int streamfd)
QMutexLocker locker(&lock);
videodevice = streamName;
+ videodevice = (videodevice == QString::null) ? "" : videodevice;
_stream_fd = streamfd;
used = 0;