• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FreeTrainの進化系を目指す


Commit MetaInfo

Revision40 (tree)
Time2016-01-03 22:27:41
Authorc477

Log Message

GetContributionでidが見つからないときにnullを返すように

Change Summary

Incremental Difference

--- trunk/framework/framework/plugin/PluginManager.cs (revision 39)
+++ trunk/framework/framework/plugin/PluginManager.cs (revision 40)
@@ -593,7 +593,13 @@
593593 /// Gets the contribution with a given ID, or null if not found.
594594 /// </summary>
595595 public Contribution GetContribution( string id ) {
596- return contributionMap[id];
596+ Contribution ctb;
597+ if(contributionMap.TryGetValue(id, out ctb)){
598+ return ctb;
599+ } else {
600+ Debug.WriteLine("Contribution not found for the id = "+ id);
601+ return null;
602+ }
597603 }
598604
599605 /// <summary>