HUB75: fix for crash on -S3

* use a fork of the HUB75 with fixed Bus_Parallel16::release()
* prevent accessing an invalid display object
This commit is contained in:
Frank
2024-10-11 21:19:22 +02:00
parent 98bdbd1eb2
commit 54467473f8
2 changed files with 4 additions and 2 deletions

View File

@@ -916,6 +916,7 @@ uint32_t __attribute__((hot)) BusHub75Matrix::getPixelColorRestored(uint16_t pix
void BusHub75Matrix::setBrightness(uint8_t b, bool immediate) {
_bri = b;
if (!_valid) return;
// if (_bri > 238) _bri=238; // not strictly needed. Enable this line if you see glitches at highest brightness.
display->setBrightness(_bri);
}
@@ -967,7 +968,7 @@ void BusHub75Matrix::cleanup() {
USER_PRINTLN("HUB75 output ended.");
//if (fourScanPanel != nullptr) delete fourScanPanel; // warning: deleting object of polymorphic class type 'VirtualMatrixPanel' which has non-virtual destructor might cause undefined behavior
delete display;
if (display) delete display;
display = nullptr;
fourScanPanel = nullptr;
if (_ledBuffer != nullptr) free(_ledBuffer); _ledBuffer = nullptr;