mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-21 19:30:03 +02:00
solving latestdata crash
This commit is contained in:
parent
11d3511460
commit
ff1b2ac19a
@ -632,8 +632,10 @@ int UDPStandardImplementation::setDynamicRange(const uint32_t i){
|
|||||||
if(oldDynamicRange != dynamicRange){
|
if(oldDynamicRange != dynamicRange){
|
||||||
|
|
||||||
//gui buffer
|
//gui buffer
|
||||||
for(int i=0;i<numberofWriterThreads;i++){
|
for(int i=0;i<MAX_NUMBER_OF_WRITER_THREADS;i++){
|
||||||
if(latestData[i]){delete[] latestData[i]; latestData[i] = 0;}
|
if(latestData[i]){delete[] latestData[i]; latestData[i] = 0;}
|
||||||
|
}
|
||||||
|
for(int i=0;i<numberofWriterThreads;i++){
|
||||||
latestData[i] = new char[bufferSize];
|
latestData[i] = new char[bufferSize];
|
||||||
}
|
}
|
||||||
//restructure fifo
|
//restructure fifo
|
||||||
@ -687,8 +689,10 @@ int UDPStandardImplementation::setTenGigaEnable(const bool b){
|
|||||||
if(oldTenGigaEnable != tengigaEnable){
|
if(oldTenGigaEnable != tengigaEnable){
|
||||||
|
|
||||||
//gui buffer
|
//gui buffer
|
||||||
for(int i=0;i<numberofWriterThreads;i++){
|
for(int i=0;i<MAX_NUMBER_OF_WRITER_THREADS;i++){
|
||||||
if(latestData[i]){delete[] latestData[i]; latestData[i] = 0;}
|
if(latestData[i]){delete[] latestData[i]; latestData[i] = 0;}
|
||||||
|
}
|
||||||
|
for(int i=0;i<numberofWriterThreads;i++){
|
||||||
latestData[i] = new char[bufferSize];
|
latestData[i] = new char[bufferSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -872,6 +876,8 @@ int UDPStandardImplementation::setDetectorType(const detectorType d){
|
|||||||
//allocate for latest data (frame copy for gui), free variables
|
//allocate for latest data (frame copy for gui), free variables
|
||||||
for(int i=0; i<MAX_NUMBER_OF_WRITER_THREADS; i++){
|
for(int i=0; i<MAX_NUMBER_OF_WRITER_THREADS; i++){
|
||||||
if(latestData[i]) {delete[] latestData[i]; latestData[i] = 0;}
|
if(latestData[i]) {delete[] latestData[i]; latestData[i] = 0;}
|
||||||
|
}
|
||||||
|
for(int i=0; i<numberofWriterThreads; i++){
|
||||||
latestData[i] = new char[bufferSize];
|
latestData[i] = new char[bufferSize];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user