[rygel/rygel-0-28] server: Avoid crash on empty protocol info
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-28] server: Avoid crash on empty protocol info
- Date: Sun, 11 Oct 2015 18:19:16 +0000 (UTC)
commit b12fd8dabb8cadf3eb89140fb73a0a54ddd6f9dc
Author: Jens Georg <mail jensge org>
Date: Wed Sep 16 14:24:08 2015 +0200
server: Avoid crash on empty protocol info
Signed-off-by: Jens Georg <mail jensge org>
.../rygel-http-resource-handler.vala | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-server/rygel-http-resource-handler.vala
b/src/librygel-server/rygel-http-resource-handler.vala
index 1c8009c..f2aceab 100644
--- a/src/librygel-server/rygel-http-resource-handler.vala
+++ b/src/librygel-server/rygel-http-resource-handler.vala
@@ -56,7 +56,7 @@ internal class Rygel.HTTPMediaResourceHandler : HTTPGetHandler {
var protocol_info = media_resource.get_protocol_info (replacements);
if (protocol_info != null) {
var pi_fields = protocol_info.to_string ().split (":", 4);
- if (pi_fields[3] != null) {
+ if (pi_fields != null && pi_fields[3] != null) {
request.msg.response_headers.append ("contentFeatures.dlna.org",
pi_fields[3]);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]