changeset 20097:7a82d0a0d526

Fix variable dereference before NULL check.
author reimar
date Sun, 08 Oct 2006 09:07:51 +0000
parents cd4649fd1f26
children e3a61060d458
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: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;