projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63c6d6a
)
st/dri: Check for NULL before dereference and assignment.
author
Vinson Lee
<vlee@vmware.com>
Sun, 18 Apr 2010 06:40:14 +0000
(23:40 -0700)
committer
Vinson Lee
<vlee@vmware.com>
Sun, 18 Apr 2010 06:40:14 +0000
(23:40 -0700)
src/gallium/state_trackers/dri/drm/dri1.c
patch
|
blob
|
history
diff --git
a/src/gallium/state_trackers/dri/drm/dri1.c
b/src/gallium/state_trackers/dri/drm/dri1.c
index bdf251653d9cde792c808b603a296a5b0df2d3d1..e216e46a87e6db478de3a3eba8125709d6a57900 100644
(file)
--- a/
src/gallium/state_trackers/dri/drm/dri1.c
+++ b/
src/gallium/state_trackers/dri/drm/dri1.c
@@
-89,10
+89,18
@@
dri1_propagate_drawable_change(struct dri_context *ctx)
{
__DRIdrawable *dPriv = ctx->dPriv;
__DRIdrawable *rPriv = ctx->rPriv;
- struct dri_drawable *draw
= dri_drawable(dPriv)
;
- struct dri_drawable *read
= dri_drawable(rPriv)
;
+ struct dri_drawable *draw;
+ struct dri_drawable *read;
boolean flushed = FALSE;
+ if (dPriv) {
+ draw = dri_drawable(dPriv);
+ }
+
+ if (rPriv) {
+ read = dri_drawable(rPriv);
+ }
+
if (dPriv && draw->texture_stamp != dPriv->lastStamp) {
ctx->st->flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
flushed = TRUE;