diff options
author | Aaron Giles <aaron@aarongiles.com> | 2010-10-18 04:23:27 +0000 |
---|---|---|
committer | Aaron Giles <aaron@aarongiles.com> | 2010-10-18 04:23:27 +0000 |
commit | c724f32a288b3ea00d08ef416b46fb0b9c9b39a6 (patch) | |
tree | e92a67d793bc321d5fa1fed5dc419f4abc334226 | |
parent | 628f203db161d9d1ab31baffaa9e02f016ecd032 (diff) |
Fix divide by zero with no-screen games.
-rw-r--r-- | src/emu/video.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/emu/video.c b/src/emu/video.c index dbd52f117ee..ed1fc210059 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -1600,10 +1600,9 @@ int video_get_view_for_target(running_machine *machine, render_target *target, c } /* if we don't have a match, default to the nth view */ - if (viewindex == -1) + int scrcount = screen_count(*machine->config); + if (viewindex == -1 && scrcount > 0) { - int scrcount = screen_count(*machine->config); - /* if we have enough targets to be one per screen, assign in order */ if (numtargets >= scrcount) { |