mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2026-02-12 16:10:54 +00:00
libsysprof-ui: check for NULL
This commit is contained in:
@ -822,6 +822,8 @@ sysprof_profiler_menu_button_validate_spawn (SysprofProfilerMenuButton *self,
|
|||||||
{
|
{
|
||||||
g_autoptr(GPtrArray) cooked = g_ptr_array_new ();
|
g_autoptr(GPtrArray) cooked = g_ptr_array_new ();
|
||||||
|
|
||||||
|
if (argv != NULL)
|
||||||
|
{
|
||||||
if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
|
if (g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS))
|
||||||
{
|
{
|
||||||
g_ptr_array_add (cooked, "flatpak-spawn");
|
g_ptr_array_add (cooked, "flatpak-spawn");
|
||||||
@ -831,6 +833,8 @@ sysprof_profiler_menu_button_validate_spawn (SysprofProfilerMenuButton *self,
|
|||||||
|
|
||||||
for (guint i = 0; argv[i] != NULL; i++)
|
for (guint i = 0; argv[i] != NULL; i++)
|
||||||
g_ptr_array_add (cooked, argv[i]);
|
g_ptr_array_add (cooked, argv[i]);
|
||||||
|
}
|
||||||
|
|
||||||
g_ptr_array_add (cooked, NULL);
|
g_ptr_array_add (cooked, NULL);
|
||||||
|
|
||||||
sysprof_profiler_set_spawn_argv (priv->profiler,
|
sysprof_profiler_set_spawn_argv (priv->profiler,
|
||||||
|
|||||||
Reference in New Issue
Block a user