Sophie

Sophie

distrib > Mandriva > 2009.1 > i586 > media > main-release-src > by-pkgid > ca8b84b3b7084ab22be0ee5ea15a364d > files > 9

kdenetwork4-4.2.2-5mdv2009.1.src.rpm

# SVN commit 949088 by schafer:
# 
# Fixed bug that causes a crash if the GLOBAL section is missing in the smb.conf file
# BUG: 99376
# 

Index: filesharing/advanced/kcm_sambaconf/sambashare.cpp
===================================================================
--- filesharing/advanced/kcm_sambaconf/sambashare.cpp	(revision 949087)
+++ filesharing/advanced/kcm_sambaconf/sambashare.cpp	(revision 949088)
@@ -115,9 +115,13 @@
 
   SambaShare* globals = _sambaFile->find("global");
 
-  QString s = globals->getValue(name,false,defaultValue);
+  QString ret;
+  if (globals != 0)
+    ret = globals->getValue(name,false,defaultValue);
+  else if (defaultValue)
+    ret = getDefaultValue(name);
 
-  return s;
+  return ret;
 }