~xavi-garcia-mena/indicator-sound/icon-volume-zero

« back to all changes in this revision

Viewing changes to src/media-player-mpris.vala

  • Committer: CI Train Bot
  • Author(s): Ted Gould
  • Date: 2015-04-03 14:51:59 UTC
  • mfrom: (487.1.2 lp1428711-null-player)
  • Revision ID: ci-train-bot@canonical.com-20150403145159-q51hyspi5us4l7pi
Handle Vala incorrectly returning null for a non-null type Fixes: #1428711
Approved by: Charles Kerr, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
                        gproxy.g_properties_changed.connect (this.proxy_properties_changed);
203
203
 
204
204
                        this.notify_property ("is-running");
205
 
                        this.state = this.proxy.PlaybackStatus;
 
205
                        this.state = this.proxy.PlaybackStatus != null ? this.proxy.PlaybackStatus : "Unknown";
206
206
                        this.update_current_track (gproxy.get_cached_property ("Metadata"));
207
207
 
208
208
                        if (this.play_when_attached) {
270
270
 
271
271
        void proxy_properties_changed (DBusProxy proxy, Variant changed_properties, string[] invalidated_properties) {
272
272
                if (changed_properties.lookup ("PlaybackStatus", "s", null)) {
273
 
                        this.state = this.proxy.PlaybackStatus;
 
273
                        this.state = this.proxy.PlaybackStatus != null ? this.proxy.PlaybackStatus : "Unknown";
274
274
                }
275
275
 
276
276
                var metadata = changed_properties.lookup_value ("Metadata", new VariantType ("a{sv}"));