[gnome-games] steam: Skip libraries from InstallPath if it's empty



commit ba26674b9f7845082f0035c9b5fbd6d3033f32f7
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date:   Tue Aug 14 19:21:16 2018 +0500

    steam: Skip libraries from InstallPath if it's empty
    
    Prevents runtime warning of calling add_library() with null argument.

 plugins/steam/src/steam-uri-source.vala | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/plugins/steam/src/steam-uri-source.vala b/plugins/steam/src/steam-uri-source.vala
index c35568f6..8d67c92d 100644
--- a/plugins/steam/src/steam-uri-source.vala
+++ b/plugins/steam/src/steam-uri-source.vala
@@ -26,6 +26,10 @@ private class Games.SteamUriSource : Object, UriSource {
                var install_path = registry.get_data (INSTALL_PATH_REGISTRY_PATH);
 
                add_library (base_dir + DEFAULT_INSTALL_DIR_SYMLINK);
+
+               if (install_path == null)
+                       return;
+
                add_library (install_path);
 
                // `/LibraryFolders/$NUMBER` entries in the libraryfolders.vdf registry


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]