diff options
author | Hexagon12 <Hexagon12@users.noreply.github.com> | 2019-05-19 16:27:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-19 16:27:15 +0100 |
commit | b94b08fa6fa385aaf2d869f6d1dfc2033ceb0ba7 (patch) | |
tree | 48f5ebec018b821deeb49765dae91b06c9642545 /src | |
parent | f8b1e533699093f2eb4a013ce35a946dcdf0790c (diff) | |
parent | 9e98100c9493f5a04de45002e8b4b1cd07b2b685 (diff) |
Merge pull request #2491 from FernandoS27/dma-fix
Dma_pusher: ASSERT on empty command_list
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/dma_pusher.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/dma_pusher.cpp b/src/video_core/dma_pusher.cpp index 036e66f05..3175579cc 100644 --- a/src/video_core/dma_pusher.cpp +++ b/src/video_core/dma_pusher.cpp @@ -40,6 +40,13 @@ bool DmaPusher::Step() { } const CommandList& command_list{dma_pushbuffer.front()}; + ASSERT_OR_EXECUTE(!command_list.empty(), { + // Somehow the command_list is empty, in order to avoid a crash + // We ignore it and assume its size is 0. + dma_pushbuffer.pop(); + dma_pushbuffer_subindex = 0; + return true; + }); const CommandListHeader command_list_header{command_list[dma_pushbuffer_subindex++]}; GPUVAddr dma_get = command_list_header.addr; GPUVAddr dma_put = dma_get + command_list_header.size * sizeof(u32); |