changeset 20098:e3a61060d458

Another != NULL check after dereferencing
author reimar
date Sun, 08 Oct 2006 09:10:55 +0000
parents 7a82d0a0d526
children abf8f12ea6ed
files m_option.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/m_option.c	Sun Oct 08 09:07:51 2006 +0000
+++ b/m_option.c	Sun Oct 08 09:10:55 2006 +0000
@@ -1420,13 +1420,14 @@
   char** opts;
   int r;
   m_obj_params_t* p = opt->priv;
-  m_struct_t* desc = p->desc;
+  m_struct_t* desc;
   char* cpy = strdup(param);
   
   // We need the object desc
   if(!p)
     return M_OPT_INVALID;
   
+  desc = p->desc;
   r = get_obj_params(name,desc->name,cpy,desc,p->separator,&opts);
   free(cpy);
   if(r < 0)