diff m_option.c @ 20097:7a82d0a0d526

Fix variable dereference before NULL check.
author reimar
date Sun, 08 Oct 2006 09:07:51 +0000
parents 9f256c4066ff
children e3a61060d458
line wrap: on
line diff
--- a/m_option.c	Sun Oct 08 09:05:27 2006 +0000
+++ b/m_option.c	Sun Oct 08 09:07:51 2006 +0000
@@ -1787,7 +1787,7 @@
   m_obj_presets_t* obj_p = (m_obj_presets_t*)opt->priv;
   m_struct_t *in_desc,*out_desc;
   int s,i;
-  unsigned char* pre = obj_p->presets;
+  unsigned char* pre;
   char* pre_name = NULL;
 
   if(!obj_p) {
@@ -1798,6 +1798,7 @@
   if(!param)
     return M_OPT_MISSING_PARAM;
 
+  pre = obj_p->presets;
   in_desc = obj_p->in_desc;
   out_desc = obj_p->out_desc ? obj_p->out_desc : obj_p->in_desc;
   s = in_desc->size;