     
     func showVideoView(command: CDVInvokedUrlCommand) {
         dispatch_async(dispatch_get_main_queue()) {
-            self.localVideoView!.hidden = false;
-            
+            if (self.localVideoView != nil) {
+                self.localVideoView!.hidden = false;
+            }    
             for remoteVideoView in self.remoteVideoViews {
                 remoteVideoView.videoView.hidden = false;
             } 

    
    func hideVideoView(command: CDVInvokedUrlCommand) {
        dispatch_async(dispatch_get_main_queue()) {
            self.localVideoView!.hidden = true;
            
            for remoteVideoView in self.remoteVideoViews {
                remoteVideoView.videoView.hidden = true;
            }

struct VideoTrackViewPair {
    var videoView: RTCEAGLVideoView
    var videoTrack: RTCVideoTrack
}
