diff options
author | truelight <truelight@openttd.org> | 2007-08-10 13:33:04 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2007-08-10 13:33:04 +0000 |
commit | 76ab8ab86ca3a7acf0a365b4d1b9311d13e5585b (patch) | |
tree | d60e3fab3ad651d635c66214fcea0d61ba699a57 /src | |
parent | 1a5b0a3417129a464bc316899d8f7ca9a64e8f5b (diff) | |
download | openttd-76ab8ab86ca3a7acf0a365b4d1b9311d13e5585b.tar.xz |
(svn r10839) -Fix [FS#873]: bring up the assert window for OSX even when there isn't a video-driver loaded (PinguTux)
Diffstat (limited to 'src')
-rw-r--r-- | src/video/cocoa_v.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video/cocoa_v.mm b/src/video/cocoa_v.mm index de5cbb494..d4df1de05 100644 --- a/src/video/cocoa_v.mm +++ b/src/video/cocoa_v.mm @@ -2064,14 +2064,16 @@ void CocoaDialog(const char* title, const char* message, const char* buttonLabel _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; } |