Skip to content

Commit 6623c8d

Browse files
committed
fix(w3dview): add missing RefCountPtr cleanups and fix indentation
1 parent 187902f commit 6623c8d

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

Core/Tools/W3DView/PlaySoundDialog.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ void
9999
PlaySoundDialogClass::OnCancel (void)
100100
{
101101
SoundObj->Stop ();
102+
SoundObj.Clear();
102103

103104
CDialog::OnCancel ();
104105
return ;

Core/Tools/W3DView/RingPropertySheet.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ RingPropertySheetClass::Add_Object_To_Viewer (void)
198198

199199
//
200200
// Display the object
201-
//
202-
doc->Reload_Displayed_Object ();
203-
m_LastSavedName = m_RenderObj->Get_Name ();
204-
m_RenderObj = RefCountPtr<RingRenderObjClass>::Create_AddRef((RingRenderObjClass *)doc->GetDisplayedObject ());
201+
//
202+
doc->Reload_Displayed_Object ();
203+
m_LastSavedName = m_RenderObj->Get_Name ();
204+
m_RenderObj = RefCountPtr<RingRenderObjClass>::Create_AddRef((RingRenderObjClass *)doc->GetDisplayedObject ());
205205

206206
//
207207
// Pass the object along to the pages

Core/Tools/W3DView/W3DViewDoc.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,9 +380,9 @@ CW3DViewDoc::InitScene (void)
380380
m_pC2DScene = new SimpleSceneClass;
381381
ASSERT (m_pC2DScene);
382382

383-
// Instantiate a new 2D cursor scene
384-
m_pCursorScene = RefCountPtr<SceneClass>::Create_NoAddRef(new SimpleSceneClass);
385-
ASSERT (m_pCursorScene.Peek());
383+
// Instantiate a new 2D cursor scene
384+
m_pCursorScene = RefCountPtr<SceneClass>::Create_NoAddRef(new SimpleSceneClass);
385+
ASSERT (m_pCursorScene.Peek());
386386

387387
Create_Cursor ();
388388
m_pCursorScene->Add_Render_Object (m_pCursor.Peek());
@@ -652,6 +652,7 @@ CW3DViewDoc::DisplayObject
652652
{
653653
// Lose the animation
654654
SAFE_DELETE (m_pCAnimCombo);
655+
m_pCAnimation.Clear();
655656

656657
// Do we have an old object to remove from the scene?
657658
if (add_ghost == false) {

0 commit comments

Comments
 (0)