Skip to content

Commit 885b2a6

Browse files
committed
Check for null ref in ROS name validation
1 parent 51489aa commit 885b2a6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Uml.Robotics.Ros/Names.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ public static bool IsValidCharInName(char c)
2424
public static bool Validate(string name, out string error)
2525
{
2626
error = null;
27+
if (name == null)
28+
{
29+
error = "Name must no be null.";
30+
return false;
31+
}
32+
2733
if (name == "" || name.StartsWith("__"))
2834
return true;
2935
if (!char.IsLetter(name[0]) && name[0] != '/' && name[0] != '~')

Uml.Robotics.Ros/Uml.Robotics.Ros.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<RuntimeIdentifiers>win10-x64;osx.10.11-x64;ubuntu.16.04-x64</RuntimeIdentifiers>
66
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
77
<IncludeSymbols>true</IncludeSymbols>
8-
<Version>1.0.3</Version>
8+
<Version>1.0.4</Version>
99
<PackageProjectUrl>https://github.com/xamla/ROS.NET</PackageProjectUrl>
1010
<PackageLicenseUrl>https://raw.githubusercontent.com/Xamla/ROS.NET/master/LICENSE</PackageLicenseUrl>
1111
<Authors>ROS.net Contributors</Authors>

0 commit comments

Comments
 (0)