Skip to content

Commit d2658c7

Browse files
committed
add null check
1 parent 0daf52f commit d2658c7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Flow.Launcher.Core/ExternalPlugins/Environments/AbstractPluginEnvironment.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ public static void PreStartPluginExecutablePathUpdate(Settings settings)
204204

205205
private static bool IsUsingPortablePath(string filePath, string pluginEnvironmentName)
206206
{
207+
if (string.IsNullOrEmpty(filePath))
208+
return false;
209+
207210
// DataLocation.PortableDataPath returns the current portable path, this determines if an out
208211
// of date path is also a portable path.
209212
var portableAppEnvLocation = $"UserData\\{DataLocation.PluginEnvironments}\\{pluginEnvironmentName}";
@@ -213,6 +216,9 @@ private static bool IsUsingPortablePath(string filePath, string pluginEnvironmen
213216

214217
private static bool IsUsingRoamingPath(string filePath)
215218
{
219+
if (string.IsNullOrEmpty(filePath))
220+
return false;
221+
216222
return filePath.StartsWith(DataLocation.RoamingDataPath);
217223
}
218224

0 commit comments

Comments
 (0)