[gnome-games] preferences-page-platforms-retro-row: Null-check core descriptors
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] preferences-page-platforms-retro-row: Null-check core descriptors
- Date: Sat, 12 Sep 2020 13:30:31 +0000 (UTC)
commit 65fbf2f56d56be5a31dd57d7ad32077bacf02819
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Sat Sep 12 18:29:56 2020 +0500
preferences-page-platforms-retro-row: Null-check core descriptors
Fixes criticals when opening preferences.
src/ui/preferences-page-platforms-retro-row.vala | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/src/ui/preferences-page-platforms-retro-row.vala
b/src/ui/preferences-page-platforms-retro-row.vala
index a7e985d4..b7ba6c29 100644
--- a/src/ui/preferences-page-platforms-retro-row.vala
+++ b/src/ui/preferences-page-platforms-retro-row.vala
@@ -47,6 +47,9 @@ private class Games.PreferencesPagePlatformsRetroRow : Hdy.ComboRow {
private void notify_selected_index_cb () {
var core = model.get_item (selected_index) as Retro.CoreDescriptor;
+ if (core == null)
+ return;
+
var core_manager = RetroCoreManager.get_instance ();
core_manager.set_preferred_core (platform, core);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]