Skip to content

Commit 17e572a

Browse files
committed
[FirebaseAI] Fix bug in LiveSessionResponse
1 parent 95c625b commit 17e572a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

firebaseai/src/LiveSessionResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public readonly struct LiveSessionResponse {
4040
public string Text {
4141
get {
4242
StringBuilder stringBuilder = new();
43-
if (Message is LiveSessionContent content) {
43+
if (Message is LiveSessionContent content && content.Content != null) {
4444
foreach (var part in content.Content?.Parts) {
4545
if (part is ModelContent.TextPart textPart) {
4646
stringBuilder.Append(textPart.Text);

0 commit comments

Comments
 (0)