From 99a19d27cb22f9dc7769c1b537ef57b4e7d7f25b Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 22 Apr 2014 11:16:34 -0500 Subject: [PATCH] KIWAY::Player() wxASSERT --- common/kiway.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/kiway.cpp b/common/kiway.cpp index d8e93a00d5..198a8a21b6 100644 --- a/common/kiway.cpp +++ b/common/kiway.cpp @@ -241,16 +241,17 @@ KIWAY_PLAYER* KIWAY::Player( FRAME_T aFrameType, bool doCreate ) if( doCreate ) { FACE_T face_type = KifaceType( aFrameType ); - wxASSERT( face_type != FACE_T(-1) ); KIFACE* kiface = KiFACE( face_type ); - wxASSERT( kiface ); - KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); + if( kiface ) + { + KIWAY_PLAYER* frame = (KIWAY_PLAYER*) kiface->CreateWindow( m_top, aFrameType, this, KFCTL_PROJECT_SUITE ); - return m_player[aFrameType] = frame; + return m_player[aFrameType] = frame; + } } return NULL;