jtdx should not crash on start, when SDR is off

This commit is contained in:
Arvo Järve 2021-03-29 22:44:25 +03:00
parent 1e726df090
commit fd15eef445
3 changed files with 31 additions and 31 deletions

View file

@ -480,20 +480,20 @@ void TransceiverBase::shutdown ()
ms = jtdxtime_->currentMSecsSinceEpoch2();
}
fclose (pFile);
#endif
may_update u {this};
#if JTDX_DEBUG_TO_FILE
pFile = fopen (debug_file_.c_str(),"a");
if (jtdxtime_ == nullptr)
fprintf(pFile,"may_update\n");
else
fprintf(pFile,"%s Timing may_update\n",jtdxtime_->currentDateTimeUtc2().toString("hh:mm:ss.zzz").toStdString().c_str());
fclose (pFile);
#endif
if (requested_.online ())
{
try
{
may_update u {this};
#if JTDX_DEBUG_TO_FILE
pFile = fopen (debug_file_.c_str(),"a");
if (jtdxtime_ == nullptr)
fprintf(pFile,"may_update\n");
else
fprintf(pFile,"%s Timing may_update\n",jtdxtime_->currentDateTimeUtc2().toString("hh:mm:ss.zzz").toStdString().c_str());
fclose (pFile);
#endif
// try and ensure PTT isn't left set
do_ptt (false);
#if JTDX_DEBUG_TO_FILE