projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d553479
)
util: Assert that pointer is not null before dereferencing.
author
Vinson Lee
<vlee@vmware.com>
Thu, 25 Feb 2010 10:42:41 +0000
(
02:42
-0800)
committer
Vinson Lee
<vlee@vmware.com>
Thu, 25 Feb 2010 10:42:41 +0000
(
02:42
-0800)
src/gallium/auxiliary/util/u_inlines.h
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_inlines.h
b/src/gallium/auxiliary/util/u_inlines.h
index e95d58ea863d527ba156c975fcf027c1447e4ac5..0cb3432c6e4a5c983255b9e34c6d0ed0f23c60e1 100644
(file)
--- a/
src/gallium/auxiliary/util/u_inlines.h
+++ b/
src/gallium/auxiliary/util/u_inlines.h
@@
-90,7
+90,10
@@
pipe_reference(struct pipe_reference *ptr, struct pipe_reference *reference)
static INLINE void
pipe_buffer_reference(struct pipe_buffer **ptr, struct pipe_buffer *buf)
{
- struct pipe_buffer *old_buf = *ptr;
+ struct pipe_buffer *old_buf;
+
+ assert(ptr);
+ old_buf = *ptr;
if (pipe_reference(&(*ptr)->reference, &buf->reference))
old_buf->screen->buffer_destroy(old_buf);