Resolves NPE thrown when audio recording metadata is null. (#486)

This commit is contained in:
Denny Sheirer
2019-01-12 09:43:54 -05:00
committed by GitHub
parent 9378254a38
commit e51f485a2e

View File

@@ -1,7 +1,7 @@
/* /*
* ****************************************************************************** * ******************************************************************************
* sdrtrunk * sdrtrunk
* Copyright (C) 2014-2018 Dennis Sheirer * Copyright (C) 2014-2019 Dennis Sheirer
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@@ -316,6 +316,8 @@ public class WaveMetadata
waveMetadata.add(WaveMetadataType.SOFTWARE, SystemProperties.getInstance().getApplicationName()); waveMetadata.add(WaveMetadataType.SOFTWARE, SystemProperties.getInstance().getApplicationName());
waveMetadata.add(WaveMetadataType.DATE_CREATED, SDF.format(new Date(System.currentTimeMillis()))); waveMetadata.add(WaveMetadataType.DATE_CREATED, SDF.format(new Date(System.currentTimeMillis())));
if(identifierCollection != null)
{
Identifier system = identifierCollection.getIdentifier(IdentifierClass.CONFIGURATION, Form.SYSTEM, Role.ANY); Identifier system = identifierCollection.getIdentifier(IdentifierClass.CONFIGURATION, Form.SYSTEM, Role.ANY);
if(system instanceof SystemConfigurationIdentifier) if(system instanceof SystemConfigurationIdentifier)
{ {
@@ -399,6 +401,7 @@ public class WaveMetadata
} }
} }
} }
}
return waveMetadata; return waveMetadata;
} }