diff options
author | walter harms <wharms@bfs.de> | 2010-10-30 10:47:23 +0200 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-11-10 22:04:25 -0800 |
commit | 8572cba2b9094dcd8ee5b4c5bcf3c38f1f291918 (patch) | |
tree | 9eb5179c2082b2d39ae4cbdbd5ede87d62fad7f5 | |
parent | 6c75b449f6436b787247e164bee03691af2a4f55 (diff) |
src/Resource.c: Fix possible NULL access
Signed-off-by: walter harms <wharms@bfs.de>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | src/Resources.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Resources.c b/src/Resources.c index 1cb37d4..67d6860 100644 --- a/src/Resources.c +++ b/src/Resources.c @@ -967,8 +967,10 @@ static XtCacheRef *GetResources( if (cache_ptr && *cache_ptr) cache_ptr++; } else { - *((XtTranslations *)&widget->core.tm.current_state) = - *((XtTranslations *)value.addr); + /* value.addr can be NULL see: !already_copied */ + if (value.addr) + *((XtTranslations *)&widget->core.tm.current_state) = + *((XtTranslations *)value.addr); } } } |