Skip to content

Commit d63c712

Browse files
committed
Set m_graphicsBuffer to nullptr after delete[]
1 parent 2fd36a0 commit d63c712

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/qwiic_oled_custom.h

+3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,10 @@ class QwOLEDCustom : public QwGrSSD1306 {
8181
~QwOLEDCustom()
8282
{
8383
if (m_graphicsBuffer != nullptr)
84+
{
8485
delete[] m_graphicsBuffer;
86+
m_graphicsBuffer = nullptr;
87+
}
8588
};
8689

8790
// set up the specific device settings

0 commit comments

Comments
 (0)