projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40a0b97
)
st/nine: Fix possible crash on error
author
Patrick Rudolph
<siro@das-labor.org>
Thu, 22 Oct 2015 15:02:16 +0000
(17:02 +0200)
committer
Axel Davy
<axel.davy@ens.fr>
Thu, 4 Feb 2016 21:12:17 +0000
(22:12 +0100)
In case swapchain creation fails This->swapchains[i] might be NULL and
causes a crash.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/device9.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/nine/device9.c
b/src/gallium/state_trackers/nine/device9.c
index 9160b16a51f0780fc25ed3c8c991f086664d1af8..e4ac61a5a43ebf7137c884f02c9b6b5cc79ba61f 100644
(file)
--- a/
src/gallium/state_trackers/nine/device9.c
+++ b/
src/gallium/state_trackers/nine/device9.c
@@
-460,7
+460,8
@@
NineDevice9_dtor( struct NineDevice9 *This )
if (This->swapchains) {
for (i = 0; i < This->nswapchains; ++i)
- NineUnknown_Unbind(NineUnknown(This->swapchains[i]));
+ if (This->swapchains[i])
+ NineUnknown_Unbind(NineUnknown(This->swapchains[i]));
FREE(This->swapchains);
}