summaryrefslogtreecommitdiffhomepage
path: root/Stars45/RadioTraffic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/RadioTraffic.cpp')
-rw-r--r--Stars45/RadioTraffic.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/Stars45/RadioTraffic.cpp b/Stars45/RadioTraffic.cpp
index b5caba0..d87ed2f 100644
--- a/Stars45/RadioTraffic.cpp
+++ b/Stars45/RadioTraffic.cpp
@@ -1,6 +1,6 @@
/* Project Starshatter 4.5
Destroyer Studios LLC
- Copyright © 1997-2004. All Rights Reserved.
+ Copyright (C) 1997-2004. All Rights Reserved.
SUBSYSTEM: Stars.exe
FILE: RadioTraffic.cpp
@@ -371,14 +371,16 @@ RadioTraffic::DisplayMessage(RadioMessage* msg)
RadioVox* vox = new(__FILE__,__LINE__) RadioVox(vox_channel, path[vox_channel], txt_buf);
- vox->AddPhrase(dst_buf);
- vox->AddPhrase(src_buf);
- vox->AddPhrase(act_buf);
+ if (vox) {
+ vox->AddPhrase(dst_buf);
+ vox->AddPhrase(src_buf);
+ vox->AddPhrase(act_buf);
- if (vox && !vox->Start()) {
- RadioView::Message(txt_buf);
- delete vox;
- }
+ if (!vox->Start()) {
+ RadioView::Message(txt_buf);
+ delete vox;
+ }
+ }
}
// +----------------------------------------------------------------------+