Browse Source

Check that properties are not set to null (the value null cannot be saved, see crash in forum-11130).

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@5740 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
pull/1/head
Daniel Grunwald 16 years ago
parent
commit
76e48b3c63
  1. 4
      src/Main/Core/Project/Src/Services/PropertyService/Properties.cs

4
src/Main/Core/Project/Src/Services/PropertyService/Properties.cs

@ -95,6 +95,10 @@ namespace ICSharpCode.Core
public void Set<T>(string property, T value) public void Set<T>(string property, T value)
{ {
if (property == null)
throw new ArgumentNullException("property");
if (value == null)
throw new ArgumentNullException("value");
T oldValue = default(T); T oldValue = default(T);
lock (properties) { lock (properties) {
if (!properties.ContainsKey(property)) { if (!properties.ContainsKey(property)) {

Loading…
Cancel
Save