r23779: Change from v2 or later to v3 or later.
[amitay/samba.git] / source3 / registry / reg_eventlog.c
index d0da12637a3e719b74064aa223ce1c01b4b9dc6a..8d93cee7dc516c7e4cfba0123f37fad2e9cf270b 100644 (file)
@@ -8,7 +8,7 @@
  *  
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation; either version 3 of the License, or
  *  (at your option) any later version.
  *  
  *  This program is distributed in the hope that it will be useful,
@@ -194,6 +194,10 @@ BOOL eventlog_add_source( const char *eventlog, const char *sourcename,
        int i;
        int numsources;
 
+       if (!elogs) {
+               return False;
+       }
+
        for ( i = 0; elogs[i]; i++ ) {
                if ( strequal( elogs[i], eventlog ) )
                        break;