mirror of
https://github.com/holub/mame
synced 2025-06-30 07:58:56 +03:00
don't crash if malloc fails (nw)
This commit is contained in:
parent
e77ccca75d
commit
a6890cb916
@ -133,7 +133,7 @@ void win_monitor_info::refresh()
|
|||||||
assert(result);
|
assert(result);
|
||||||
char *temp = utf8_from_tstring(m_info.szDevice);
|
char *temp = utf8_from_tstring(m_info.szDevice);
|
||||||
|
|
||||||
strncpy(m_name, temp, sizeof(m_name));
|
if (temp) strncpy(m_name, temp, sizeof(m_name));
|
||||||
|
|
||||||
m_pos_size = RECT_to_osd_rect(m_info.rcMonitor);
|
m_pos_size = RECT_to_osd_rect(m_info.rcMonitor);
|
||||||
m_usuable_pos_size = RECT_to_osd_rect(m_info.rcWork);
|
m_usuable_pos_size = RECT_to_osd_rect(m_info.rcWork);
|
||||||
|
Loading…
Reference in New Issue
Block a user