Skip to content
Snippets Groups Projects
Commit f9653722 authored by Simon McVittie's avatar Simon McVittie
Browse files

Merge branch 'wip/smcv/preconditions' into 'master'

Add some missing preconditions

See merge request steam/steam-runtime-tools!59
parents 80320983 a3417a5e
Branches
Tags
1 merge request!59Add some missing preconditions
Pipeline #1716 passed
......@@ -54,6 +54,8 @@ _srt_architecture_can_run (const char *helpers_path,
const gchar *ld_preload;
gchar *filtered_preload = NULL;
g_return_val_if_fail (multiarch != NULL, FALSE);
if (helpers_path == NULL)
helpers_path = _srt_get_helpers_path ();
......
......@@ -158,6 +158,11 @@ _srt_runtime_check (const char *bin32,
GError *error = NULL;
GStrv my_environ = NULL;
g_return_val_if_fail (version_out == NULL || *version_out == NULL,
SRT_RUNTIME_ISSUES_INTERNAL_ERROR);
g_return_val_if_fail (path_out == NULL || *path_out == NULL,
SRT_RUNTIME_ISSUES_INTERNAL_ERROR);
if (custom_environ == NULL)
my_environ = g_get_environ ();
else
......
......@@ -69,6 +69,11 @@ _srt_steam_check (const GStrv environ,
const char *user_data = NULL;
GStrv env = NULL;
g_return_val_if_fail (path_out == NULL || *path_out == NULL,
SRT_STEAM_ISSUES_INTERNAL_ERROR);
g_return_val_if_fail (bin32_out == NULL || *bin32_out == NULL,
SRT_STEAM_ISSUES_INTERNAL_ERROR);
env = (environ == NULL) ? g_get_environ () : g_strdupv (environ);
home = g_environ_getenv (env, "HOME");
......@@ -87,11 +92,6 @@ _srt_steam_check (const GStrv environ,
dot_steam_steam = g_build_filename (home, ".steam", "steam", NULL);
dot_steam_root = g_build_filename (home, ".steam", "root", NULL);
g_return_val_if_fail (path_out == NULL || *path_out == NULL,
SRT_STEAM_ISSUES_INTERNAL_ERROR);
g_return_val_if_fail (bin32_out == NULL || *bin32_out == NULL,
SRT_STEAM_ISSUES_INTERNAL_ERROR);
/* Canonically, ~/.steam/steam is a symlink to the Steam installation.
* (This is ignoring the Valve-internal "beta universe", which uses
* ~/.steam/steambeta instead.) */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment