From bb6e3a0daf1a2a2c15549dc4ce9446c196c37569 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Sun, 8 Sep 2013 11:29:09 +0100 Subject: [PATCH] Don't try to pop an entry from an empty list in SSDP::ProcessData. Inspired by patch from Lawrence Rust but changed to use IsEmpty() instead of size() --- mythtv/libs/libmythupnp/ssdp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mythtv/libs/libmythupnp/ssdp.cpp b/mythtv/libs/libmythupnp/ssdp.cpp index 26de6d49fae..9e503eb351c 100644 --- a/mythtv/libs/libmythupnp/ssdp.cpp +++ b/mythtv/libs/libmythupnp/ssdp.cpp @@ -373,7 +373,8 @@ void SSDP::ProcessData( MSocketDevice *pSocket ) QStringList lines = str.split("\r\n", QString::SkipEmptyParts); QString sRequestLine = lines.size() ? lines[0] : ""; - lines.pop_front(); + if (!lines.isEmpty()) + lines.pop_front(); // ------------------------------------------------------------------ // Parse request Type