Skip to content

Commit 5d9326d

Browse files
committed
Might as well null these too
1 parent b5e109a commit 5d9326d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Source/Entities/SceneLayer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ template <bool TRACK_DRAWINGS, bool STATIC_TEXTURE>
203203
int SceneLayerImpl<TRACK_DRAWINGS, STATIC_TEXTURE>::LoadDataFromBitmap(BITMAP* bitmap) {
204204
if (m_MainBitmapOwned) {
205205
destroy_bitmap(m_MainBitmap);
206+
m_MainBitmap = nullptr;
206207
}
207208

208209
m_MainBitmap = bitmap;
@@ -222,6 +223,7 @@ template <bool TRACK_DRAWINGS, bool STATIC_TEXTURE>
222223
int SceneLayerImpl<TRACK_DRAWINGS, STATIC_TEXTURE>::LoadData() {
223224
if (m_MainBitmapOwned) {
224225
destroy_bitmap(m_MainBitmap);
226+
m_MainBitmap = nullptr;
225227
}
226228

227229
// Load from disk and take ownership. Don't cache because the bitmap will be modified.

0 commit comments

Comments
 (0)