summaryrefslogtreecommitdiff
path: root/src/qcommon/cm_trace.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2013-03-26 16:50:03 +0000
committerTim Angus <tim@ngus.net>2013-03-27 11:33:16 +0000
commitecf45acd236aaf1a0d2b00a94a24d8f24fbceae4 (patch)
tree23d703104aa48a4533daed653d5c429f73dccb05 /src/qcommon/cm_trace.c
parenta6e5804c1162832fa99d31c88033cbf6f1efd2f0 (diff)
Fix some of the things clang --analyze flagged
Diffstat (limited to 'src/qcommon/cm_trace.c')
-rw-r--r--src/qcommon/cm_trace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qcommon/cm_trace.c b/src/qcommon/cm_trace.c
index 4ee53373..ccf29a48 100644
--- a/src/qcommon/cm_trace.c
+++ b/src/qcommon/cm_trace.c
@@ -717,8 +717,12 @@ void CM_TraceThroughBrush( traceWork_t *tw, cbrush_t *brush ) {
enterFrac = 0;
}
tw->trace.fraction = enterFrac;
- tw->trace.plane = *clipplane;
- tw->trace.surfaceFlags = leadside->surfaceFlags;
+ if (clipplane != NULL) {
+ tw->trace.plane = *clipplane;
+ }
+ if (leadside != NULL) {
+ tw->trace.surfaceFlags = leadside->surfaceFlags;
+ }
tw->trace.contents = brush->contents;
}
}