File tree Expand file tree Collapse file tree 1 file changed +20
-14
lines changed Expand file tree Collapse file tree 1 file changed +20
-14
lines changed Original file line number Diff line number Diff line change @@ -161,29 +161,35 @@ public void CreateModlist()
161
161
/// <returns>The mod entry if found, null otherwise</returns>
162
162
public Task < Mod > TryGetModEntry ( string internalFilePath )
163
163
{
164
- if ( String . IsNullOrWhiteSpace ( internalFilePath ) )
164
+ try
165
165
{
166
- return null ;
167
- }
166
+ if ( String . IsNullOrWhiteSpace ( internalFilePath ) )
167
+ {
168
+ return null ;
169
+ }
168
170
169
- return Task . Run ( ( ) =>
170
- {
171
- internalFilePath = internalFilePath . Replace ( "\\ " , "/" ) ;
171
+ return Task . Run ( ( ) =>
172
+ {
173
+ internalFilePath = internalFilePath . Replace ( "\\ " , "/" ) ;
172
174
173
- var modList = GetModList ( ) ;
175
+ var modList = GetModList ( ) ;
174
176
175
- if ( modList == null ) return null ;
177
+ if ( modList == null ) return null ;
176
178
177
- foreach ( var modEntry in modList . Mods )
178
- {
179
- if ( modEntry . fullPath . Equals ( internalFilePath ) )
179
+ foreach ( var modEntry in modList . Mods )
180
180
{
181
- return modEntry ;
181
+ if ( modEntry . fullPath . Equals ( internalFilePath ) )
182
+ {
183
+ return modEntry ;
184
+ }
182
185
}
183
- }
184
186
187
+ return null ;
188
+ } ) ;
189
+ } catch ( Exception ex )
190
+ {
185
191
return null ;
186
- } ) ;
192
+ }
187
193
}
188
194
189
195
/// <summary>
You can’t perform that action at this time.
0 commit comments