File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -964,8 +964,12 @@ void MCPlayer::open()
964964{
965965 MCControl::open ();
966966 prepare (MCnullstring);
967- MCPlatformAttachPlayer (m_platform_player, getstack () -> getwindow ());
968- m_is_attached = true ;;
967+ // PM-2014-10-15: [[ Bug 13650 ]] Check for nil to prevent a crash
968+ if (m_platform_player != nil)
969+ {
970+ MCPlatformAttachPlayer (m_platform_player, getstack () -> getwindow ());
971+ m_is_attached = true ;
972+ }
969973}
970974
971975void MCPlayer::close ()
@@ -981,8 +985,12 @@ void MCPlayer::close()
981985 if (s_volume_popup != nil)
982986 s_volume_popup -> close ();
983987
984- MCPlatformDetachPlayer (m_platform_player);
985- m_is_attached = false ;
988+ // PM-2014-10-15: [[ Bug 13650 ]] Check for nil to prevent a crash
989+ if (m_platform_player != nil)
990+ {
991+ MCPlatformDetachPlayer (m_platform_player);
992+ m_is_attached = false ;
993+ }
986994}
987995
988996Boolean MCPlayer::kdown (const char *string, KeySym key)
You can’t perform that action at this time.
0 commit comments