From: Robert Millan <rmh-pC/4jmrOO5FBDgjK7y7TUQ@public.gmane.org>
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH] verify SDL_Init
Date: Mon, 24 Sep 2007 16:58:28 +0200 [thread overview]
Message-ID: <20070924145828.GA29161@thorin> (raw)
[-- Attachment #1: Type: text/plain, Size: 277 bytes --]
Skipping SDL_Init failure leads to segfault in further SDL calls. This
patch makes the situation easier to understand to the user.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
[-- Attachment #2: renouveau_init.diff --]
[-- Type: text/x-diff, Size: 589 bytes --]
Index: re.c
===================================================================
RCS file: /cvsroot/nouveau/renouveau/re.c,v
retrieving revision 1.125
diff -u -r1.125 re.c
--- re.c 28 Aug 2007 11:41:31 -0000 1.125
+++ re.c 24 Sep 2007 13:42:21 -0000
@@ -53,7 +53,10 @@
*/
void setup_SDL(int opengl)
{
- SDL_Init(SDL_INIT_VIDEO);
+ if (SDL_Init(SDL_INIT_VIDEO)) {
+ fprintf (stderr, "Failed to initialise SDL video output.\n");
+ exit (1);
+ }
if (opengl) {
//SDL_GL_SetAttribute(SDL_GL_STEREO,1);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER,0);
[-- Attachment #3: Type: text/plain, Size: 181 bytes --]
_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau
reply other threads:[~2007-09-24 14:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070924145828.GA29161@thorin \
--to=rmh-pc/4jmroo5fbdgjk7y7tuq@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.