fixed crash with -debug when image loading failed (nw)

This commit is contained in:
Oliver Stöneberg 2013-02-12 18:27:58 +00:00
parent bcdf3b9dba
commit 9c6a2d3705

View File

@ -340,7 +340,7 @@ bool debug_comment_save(running_machine &machine)
device_iterator iter(machine.root_device());
bool found_comments = false;
for (device_t *device = iter.first(); device != NULL; device = iter.next())
if (device->debug()->comment_count() > 0)
if (device->debug() && device->debug()->comment_count() > 0)
{
// create a node for this device
xml_data_node *curnode = xml_add_child(systemnode, "cpu", NULL);