[gnome-games] ui: Check there is a media set before updating it
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] ui: Check there is a media set before updating it
- Date: Sun, 23 Oct 2016 09:45:56 +0000 (UTC)
commit d1cde2b39c54d74a92b547c4992a659d15c1d09a
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed Sep 28 14:37:28 2016 +0200
ui: Check there is a media set before updating it
This avoids a runtime critial error.
https://bugzilla.gnome.org/show_bug.cgi?id=772118
src/ui/media-selector.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/ui/media-selector.vala b/src/ui/media-selector.vala
index 9c0c031..ab320d7 100644
--- a/src/ui/media-selector.vala
+++ b/src/ui/media-selector.vala
@@ -23,6 +23,10 @@ private class Games.MediaSelector : Gtk.Popover {
private void update_media () {
var media_number = 0;
+
+ if (_media_set == null)
+ return;
+
_media_set.foreach_media ((media) => {
string media_name;
if (media.title == null)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]