mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-27 14:08:39 +01:00
Fix crash in crazy taxi.
This commit is contained in:
parent
55835de708
commit
bb9c516775
1 changed files with 2 additions and 0 deletions
|
@ -81,6 +81,7 @@ bool RequestCurrentStats()
|
||||||
bool GetStat( const char *pchName, int32 *pData )
|
bool GetStat( const char *pchName, int32 *pData )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("GetStat int32 %s\n", pchName);
|
PRINT_DEBUG("GetStat int32 %s\n", pchName);
|
||||||
|
if (!pchName || !pData) return false;
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
|
|
||||||
int read_data = local_storage->get_data(STATS_STORAGE_FOLDER, pchName, (char* )pData, sizeof(*pData));
|
int read_data = local_storage->get_data(STATS_STORAGE_FOLDER, pchName, (char* )pData, sizeof(*pData));
|
||||||
|
@ -93,6 +94,7 @@ bool GetStat( const char *pchName, int32 *pData )
|
||||||
bool GetStat( const char *pchName, float *pData )
|
bool GetStat( const char *pchName, float *pData )
|
||||||
{
|
{
|
||||||
PRINT_DEBUG("GetStat float %s\n", pchName);
|
PRINT_DEBUG("GetStat float %s\n", pchName);
|
||||||
|
if (!pchName || !pData) return false;
|
||||||
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
std::lock_guard<std::recursive_mutex> lock(global_mutex);
|
||||||
|
|
||||||
int read_data = local_storage->get_data(STATS_STORAGE_FOLDER, pchName, (char* )pData, sizeof(*pData));
|
int read_data = local_storage->get_data(STATS_STORAGE_FOLDER, pchName, (char* )pData, sizeof(*pData));
|
||||||
|
|
Loading…
Reference in a new issue