Skip to content

Commit

Permalink
Fix crash bug when running test 10010 due to NULL pointer (ns_pc).
Browse files Browse the repository at this point in the history
  • Loading branch information
bengardner committed Jun 13, 2013
1 parent 29e33a3 commit 9117dc6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/braces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -710,8 +710,7 @@ void add_long_closebrace_comment(void)
unc_text string;
int nl_count;

pc = chunk_get_head();
while ((pc = chunk_get_next_ncnl(pc)) != NULL)
for (pc = chunk_get_head(); pc; pc = chunk_get_next_ncnl(pc))
{
if ((pc->type == CT_FUNC_DEF) ||
(pc->type == CT_OC_MSG_DECL))
Expand Down

0 comments on commit 9117dc6

Please sign in to comment.