Skip to content

Commit a2b1db8

Browse files
committed
Fix null reference exception on threads without suitable subjects. Bump version to 6.3.1
1 parent 363085c commit a2b1db8

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

GChan/GChan.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
2424

2525
<!-- Versioning -->
26-
<Version>6.3.0</Version>
27-
<AssemblyVersion>6.3.0</AssemblyVersion>
28-
<FileVersion>6.3.0</FileVersion>
26+
<Version>6.3.1</Version>
27+
<AssemblyVersion>6.3.1</AssemblyVersion>
28+
<FileVersion>6.3.1</FileVersion>
2929
</PropertyGroup>
3030
<PropertyGroup>
3131
<ApplicationIcon>4chanIcon.ico</ApplicationIcon>

GChan/Helpers/Utils.cs

+1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ public static string CombinePathAndFilename(string directory, string filename)
211211
/// Remove a string of characters illegal for a folder name.<br/>
212212
/// Used for thread subjects if addThreadSubjectToFolder setting is enabled.
213213
/// </summary>
214+
/// <exception cref="NullReferenceException">If <paramref name="subject"/> is null.</exception>
214215
public static string SanitiseSubject(string subject)
215216
{
216217
return RemoveCharactersFromString(subject, IllegalSubjectCharacters);

GChan/Models/Trackers/Sites/Thread_4Chan.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ private void ConfigureFromUrl(string url)
255255

256256
var result = sub ?? (nameOk ? name : null) ?? (commentOk ? comment : null);
257257

258-
return Utils.SanitiseSubject(result);
258+
return result == null ? null : Utils.SanitiseSubject(result);
259259
}
260260
}
261261
}

0 commit comments

Comments
 (0)