Browse Source

Fixed a crash while copying comments to properties.

Signed-off-by: Dimitar Dobrev <dpldobrev@yahoo.com>
pull/287/head
Dimitar Dobrev 11 years ago
parent
commit
f244b0e3b4
  1. 15
      src/Generator/Passes/GetterSetterToPropertyAdvancedPass.cs

15
src/Generator/Passes/GetterSetterToPropertyAdvancedPass.cs

@ -159,13 +159,16 @@ namespace CppSharp.Passes @@ -159,13 +159,16 @@ namespace CppSharp.Passes
comment.Kind = getter.Comment.Kind;
comment.BriefText = getter.Comment.BriefText;
comment.Text = getter.Comment.Text;
comment.FullComment = new FullComment();
comment.FullComment.Blocks.AddRange(getter.Comment.FullComment.Blocks);
if (setter != null && setter.Comment != null)
if (getter.Comment.FullComment != null)
{
comment.BriefText += Environment.NewLine + setter.Comment.BriefText;
comment.Text += Environment.NewLine + setter.Comment.Text;
comment.FullComment.Blocks.AddRange(setter.Comment.FullComment.Blocks);
comment.FullComment = new FullComment();
comment.FullComment.Blocks.AddRange(getter.Comment.FullComment.Blocks);
if (setter != null && setter.Comment != null)
{
comment.BriefText += Environment.NewLine + setter.Comment.BriefText;
comment.Text += Environment.NewLine + setter.Comment.Text;
comment.FullComment.Blocks.AddRange(setter.Comment.FullComment.Blocks);
}
}
property.Comment = comment;
}

Loading…
Cancel
Save