(svn r10839) -Fix [FS#873]: bring up the assert window for OSX even when there isn't a video-driver loaded (PinguTux)
authortruelight
Fri, 10 Aug 2007 13:33:04 +0000
changeset 7434 d8f97a247304
parent 7433 0bb8f8206996
child 7435 c5d1a7a3235c
(svn r10839) -Fix [FS#873]: bring up the assert window for OSX even when there isn't a video-driver loaded (PinguTux)
src/video/cocoa_v.mm
--- a/src/video/cocoa_v.mm	Fri Aug 10 13:27:07 2007 +0000
+++ b/src/video/cocoa_v.mm	Fri Aug 10 13:33:04 2007 +0000
@@ -2064,14 +2064,16 @@
 	_cocoa_video_dialog = true;
 
 	wasstarted = _cocoa_video_started;
-	if (!_cocoa_video_started && _video_driver->Start(NULL) != NULL) {
+	if (_video_driver == NULL) {
+		setupApplication(); // Setup application before showing dialog
+	} else if (!_cocoa_video_started && _video_driver->Start(NULL) != NULL) {
 		fprintf(stderr, "%s: %s\n", title, message);
 		return;
 	}
 
 	NSRunAlertPanel([NSString stringWithCString: title], [NSString stringWithCString: message], [NSString stringWithCString: buttonLabel], nil, nil);
 
-	if (!wasstarted) _video_driver->Stop();
+	if (!wasstarted && _video_driver != NULL) _video_driver->Stop();
 
 	_cocoa_video_dialog = false;
 }