[rygel/rygel-0-16] mpris: Don't crash on faulty MPRIS implementation
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-16] mpris: Don't crash on faulty MPRIS implementation
- Date: Fri, 12 Oct 2012 09:39:46 +0000 (UTC)
commit 28df893d99b53e7b4c3a6142efd4dff25b8ca7d0
Author: Jens Georg <jensg openismus com>
Date: Tue Oct 9 13:26:52 2012 +0200
mpris: Don't crash on faulty MPRIS implementation
Fixes:
https://bugzilla.gnome.org/show_bug.cgi?id=685196
src/plugins/mpris/rygel-mpris-plugin.vala | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/mpris/rygel-mpris-plugin.vala b/src/plugins/mpris/rygel-mpris-plugin.vala
index 587e037..6e45700 100644
--- a/src/plugins/mpris/rygel-mpris-plugin.vala
+++ b/src/plugins/mpris/rygel-mpris-plugin.vala
@@ -32,8 +32,8 @@ public class Rygel.MPRIS.Plugin : Rygel.MediaRendererPlugin {
public PlayerProxy actual_player;
- public string[] mime_types;
- public string[] protocols;
+ public string[]? mime_types;
+ public string[]? protocols;
public Plugin (string service_name,
PlayerProxy actual_player) {
@@ -54,7 +54,11 @@ public class Rygel.MPRIS.Plugin : Rygel.MediaRendererPlugin {
return new MPRIS.Player (this);
}
- private string[] schemes_to_protocols (string[] schemes) {
+ private string[]? schemes_to_protocols (string[] schemes) {
+ if (schemes == null) {
+ return null;
+ }
+
var protocols = new string[schemes.length];
for (var i = 0; i < schemes.length; i++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]