libsysprof: handle failure case better

This commit is contained in:
Christian Hergert
2019-05-13 18:59:10 -07:00
parent 300461ab5d
commit e3cfdddf46

View File

@ -132,9 +132,13 @@ sysprof_kernel_symbol_load (void)
g_array_index (ar, SysprofKernelSymbol, ar->len - 1).address); g_array_index (ar, SysprofKernelSymbol, ar->len - 1).address);
#endif #endif
kernel_symbols = g_steal_pointer (&ar); if (ar->len > 0)
{
kernel_symbols = g_steal_pointer (&ar);
return TRUE;
}
return TRUE; return FALSE;
} }
static const SysprofKernelSymbol * static const SysprofKernelSymbol *