Skip to content

Commit

Permalink
处理服务器文件不存在引起的nullException
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeric-X committed May 19, 2017
1 parent edc4ea3 commit 0afe80b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions SyncClipboard/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions SyncClipboard/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<Value Profile="(Default)">https://cloud.jericx.xyz/remote.php/dav/files/JericX/Clipboard/SyncClipboard.json</Value>
</Setting>
<Setting Name="USERNAME" Type="System.String" Scope="User">
<Value Profile="(Default)">a</Value>
<Value Profile="(Default)" />
</Setting>
<Setting Name="PASSWORD" Type="System.String" Scope="User">
<Value Profile="(Default)">b</Value>
<Value Profile="(Default)" />
</Setting>
<Setting Name="IFPULL" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
Expand Down
2 changes: 1 addition & 1 deletion SyncClipboard/SyncService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ private void PullFromRemote()
{
return;
}
if (p1.Clipboard != this.oldString)
if (p1 != null && p1.Clipboard != this.oldString)
{
if (this.isFirstTime)
{
Expand Down
4 changes: 2 additions & 2 deletions SyncClipboard/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
<value>https://cloud.jericx.xyz/remote.php/dav/files/JericX/Clipboard/SyncClipboard.json</value>
</setting>
<setting name="USERNAME" serializeAs="String">
<value>a</value>
<value />
</setting>
<setting name="PASSWORD" serializeAs="String">
<value>b</value>
<value />
</setting>
<setting name="IFPULL" serializeAs="String">
<value>True</value>
Expand Down

0 comments on commit 0afe80b

Please sign in to comment.