Skip to content

Commit 6085dcd

Browse files
committed
fix(w3dview): use .Peek() in ASSERT macros for explicit pointer checking
1 parent d4b03be commit 6085dcd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Core/Tools/W3DView/W3DViewDoc.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,9 @@ CW3DViewDoc::InitScene (void)
388388
m_pC2DScene = new SimpleSceneClass;
389389
ASSERT (m_pC2DScene);
390390

391-
// Instantiate a new 2D cursor scene
392-
m_pCursorScene = RefCountPtr<SceneClass>::Create_NoAddRef(new SimpleSceneClass);
393-
ASSERT (m_pCursorScene);
391+
// Instantiate a new 2D cursor scene
392+
m_pCursorScene = RefCountPtr<SceneClass>::Create_NoAddRef(new SimpleSceneClass);
393+
ASSERT (m_pCursorScene.Peek());
394394

395395
Create_Cursor ();
396396
m_pCursorScene->Add_Render_Object (m_pCursor.Peek());
@@ -862,7 +862,7 @@ CW3DViewDoc::PlayAnimation
862862
// Get an instance of the animation object
863863
SAFE_DELETE (m_pCAnimCombo);
864864
m_pCAnimation = RefCountPtr<HAnimClass>::Create_NoAddRef(WW3DAssetManager::Get_Instance()->Get_HAnim (pszAnimationName));
865-
ASSERT (m_pCAnimation);
865+
ASSERT (m_pCAnimation.Peek());
866866

867867
// Reset the frame counter
868868
m_CurrentFrame = 0;
@@ -954,7 +954,7 @@ CW3DViewDoc::PlayAnimation
954954
SAFE_DELETE (m_pCAnimCombo);
955955
m_pCAnimCombo = pCAnimCombo;
956956
m_pCAnimation = RefCountPtr<HAnimClass>::Create_NoAddRef(m_pCAnimCombo->Get_Motion(0)); // ref added by get_motion
957-
ASSERT (m_pCAnimation);
957+
ASSERT (m_pCAnimation.Peek());
958958

959959
// It will be assumed that every animation in the m_pCAnimCombo
960960
// has the same number of frames and has the same framerate as

0 commit comments

Comments
 (0)