File tree Expand file tree Collapse file tree
VisualStudioDiscordRPC.Shared/Plugs/TextPlugs Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22using VisualStudioDiscordRPC . Shared . Services ;
33using VisualStudioDiscordRPC . Shared . Observers ;
44using System . IO ;
5+ using System ;
56
67namespace VisualStudioDiscordRPC . Shared . Plugs . TextPlugs
78{
@@ -40,12 +41,18 @@ protected override string GetData()
4041 {
4142 Microsoft . VisualStudio . Shell . ThreadHelper . ThrowIfNotOnUIThread ( ) ;
4243
44+ string noActiveSolutionString = _localizationService . Localize ( LocalizationKeys . NoActiveSolution ) ;
4345 if ( _solution == null )
4446 {
45- return _localizationService . Localize ( LocalizationKeys . NoActiveSolution ) ;
47+ return noActiveSolutionString ;
4648 }
47-
49+
4850 string solutionName = Path . GetFileNameWithoutExtension ( _solution . FullName ) ;
51+ if ( string . IsNullOrEmpty ( solutionName ) )
52+ {
53+ return noActiveSolutionString ;
54+ }
55+
4956 return string . Format ( "{0} {1}" , _localizationService . Localize ( LocalizationKeys . Solution ) , solutionName ) ;
5057 }
5158 }
You can’t perform that action at this time.
0 commit comments