diff options
author | das <das> | 2008-12-07 16:34:55 (GMT) |
---|---|---|
committer | das <das> | 2008-12-07 16:34:55 (GMT) |
commit | 213dcc2280beb163541d69f33ed2b1713da728da (patch) | |
tree | 51c6425facf14768762c5181fc1e89586539e0a1 /generic/ttk/ttkLayout.c | |
parent | dad5f8c673f46f8a689841cdc0568fff52c5ef87 (diff) | |
download | tk-213dcc2280beb163541d69f33ed2b1713da728da.zip tk-213dcc2280beb163541d69f33ed2b1713da728da.tar.gz tk-213dcc2280beb163541d69f33ed2b1713da728da.tar.bz2 |
Fix potential null dereference flagged by clang static analyzer
Diffstat (limited to 'generic/ttk/ttkLayout.c')
-rw-r--r-- | generic/ttk/ttkLayout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/ttk/ttkLayout.c b/generic/ttk/ttkLayout.c index c1e239a..2f599dd 100644 --- a/generic/ttk/ttkLayout.c +++ b/generic/ttk/ttkLayout.c @@ -5,7 +5,7 @@ * * Copyright (c) 2003 Joe English. Freely redistributable. * - * $Id: ttkLayout.c,v 1.12 2008/05/23 20:20:05 jenglish Exp $ + * $Id: ttkLayout.c,v 1.13 2008/12/07 16:34:56 das Exp $ */ #include <string.h> @@ -733,7 +733,7 @@ Ttk_LayoutTemplate Ttk_BuildLayoutTemplate(Ttk_LayoutSpec spec) last = node; } - if (spec->opcode & _TTK_CHILDREN) { + if (spec->opcode & _TTK_CHILDREN && last) { int depth = 1; last->child = Ttk_BuildLayoutTemplate(spec+1); |