From: Erik Lindahl Date: Tue, 12 Aug 2014 18:11:40 +0000 (+0200) Subject: Fix matrix pointer dereference bug in update.c X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=415c01282b41eef4fd3138d53afb08aa630bfb6c;p=alexxy%2Fgromacs.git Fix matrix pointer dereference bug in update.c The PGI compiler found a bug where an if-statement checked against a dereferenced pointer rather than the pointer itself being non-NULL. Change-Id: If08977b818f28e1c78c35222d0f4efe6ae6aad65 --- diff --git a/src/gromacs/mdlib/update.c b/src/gromacs/mdlib/update.c index e5a095baac..787135f715 100644 --- a/src/gromacs/mdlib/update.c +++ b/src/gromacs/mdlib/update.c @@ -1318,7 +1318,7 @@ static void deform(gmx_update_t upd, x[i][YY] = mu[YY][YY]*x[i][YY]+mu[ZZ][YY]*x[i][ZZ]; x[i][ZZ] = mu[ZZ][ZZ]*x[i][ZZ]; } - if (*scale_tot) + if (scale_tot != NULL) { /* The transposes of the scaling matrices are stored, * so we need to do matrix multiplication in the inverse order.