0
0
mirror of https://github.com/wolfpld/tracy.git synced 2026-01-18 17:11:26 +01:00

Merge pull request #1258 from liungkejin/patch-1

fix a nullptr crash on android devices
This commit is contained in:
Bartosz Taudul
2026-01-18 12:28:53 +01:00
committed by GitHub

View File

@@ -374,7 +374,7 @@ TRACY_API const char* GetUserFullName()
return nullptr; return nullptr;
#elif defined __ANDROID__ #elif defined __ANDROID__
const auto passwd = getpwuid( getuid() ); const auto passwd = getpwuid( getuid() );
if( passwd && *passwd->pw_gecos ) return passwd->pw_gecos; if( passwd && passwd->pw_gecos && *passwd->pw_gecos ) return passwd->pw_gecos;
return nullptr; return nullptr;
#else #else
static char buf[4*1024]; static char buf[4*1024];