mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-03-13 09:32:54 +00:00
Merge pull request #255 from rakslice/adapt_to_video_mode_segfault
Avoid segfault if SDL did not init successfully
This commit is contained in:
commit
e5d6fe4e3c
@ -723,6 +723,7 @@ void driver_base::adapt_to_video_mode() {
|
||||
ADBSetRelMouseMode(false);
|
||||
|
||||
// Init blitting routines
|
||||
if (!s) return;
|
||||
SDL_PixelFormat *f = s->format;
|
||||
VisualFormat visualFormat;
|
||||
visualFormat.depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH);
|
||||
|
@ -1107,6 +1107,7 @@ void driver_base::adapt_to_video_mode() {
|
||||
ADBSetRelMouseMode(mouse_grabbed);
|
||||
|
||||
// Init blitting routines
|
||||
if (!s) return;
|
||||
SDL_PixelFormat *f = s->format;
|
||||
VisualFormat visualFormat;
|
||||
visualFormat.depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH);
|
||||
|
@ -1101,6 +1101,7 @@ void driver_base::adapt_to_video_mode() {
|
||||
ADBSetRelMouseMode(mouse_grabbed);
|
||||
|
||||
// Init blitting routines
|
||||
if (!s) return;
|
||||
const SDL_PixelFormatDetails *f = SDL_GetPixelFormatDetails(s->format);
|
||||
VisualFormat visualFormat;
|
||||
visualFormat.depth = sdl_depth_of_video_depth(VIDEO_MODE_DEPTH);
|
||||
|
Loading…
x
Reference in New Issue
Block a user