Browse Source

ENH: make sure value is set before using it

Bill Hoffman 19 years ago
parent
commit
9c3b654991
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Source/kwsys/Registry.cxx

+ 1 - 1
Source/kwsys/Registry.cxx

@@ -212,13 +212,13 @@ bool Registry::ReadValue(const char *subkey,
   const char *key,
   const char **value)
 {
-  *value = 0;
   bool res = false;
   bool open = false;
   if ( ! value )
     {
     return res;
     }
+  *value = 0;
   if ( !m_Opened )
     {
     if ( !this->Open(this->GetTopLevel(), subkey,