[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-commits] Commit Complete



Commit by  : alex
Repository : xara
Revision   : 1466
Date       : Tue Jul 18 17:24:30 BST 2006

Changed paths:
   M /Trunk/XaraLX/wxOil/oilprefs.cpp

If a string preference is not present in the preferences file, do not overwrite the default value.


Diff:
Index: Trunk/XaraLX/wxOil/oilprefs.cpp
===================================================================
--- Trunk/XaraLX/wxOil/oilprefs.cpp	(revision 1465)
+++ Trunk/XaraLX/wxOil/oilprefs.cpp	(revision 1466)
@@ -328,11 +328,13 @@
 		{
 			// Just get the string - need to ask for the address of the String's
 			// text buffer so we can pass it to the SDK profile API.
-				wxString str;
-				wxConfig::Read(strKey, &str);
+			wxString str;
+			if (wxConfig::Read(strKey, &str))
+			{
 				str.Truncate(256);
 				*(pData.pString) = (LPCTSTR)str;
 //				*(pData.pString) = String_256(str);	// use this form when StringBase derived classes support direct conversion
+			}
 			break;
 		}
 


Xara