From 011810a2984487049a5e6e9b1c23470b4a1cccc2 Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Sun, 13 Oct 2002 15:39:30 +0000 Subject: pgx64 video plugin was crashing xine during auto probe of video_out drivers, when the system has no usable /dev/m640 device: video_out_pgx64: can't open framebuffer device (/dev/m640) Segmentation fault (core dumped) CVS patchset: 2825 CVS date: 2002/10/13 15:39:30 --- src/video_out/video_out_pgx64.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/video_out/video_out_pgx64.c b/src/video_out/video_out_pgx64.c index b79a85688..821d4a5fd 100644 --- a/src/video_out/video_out_pgx64.c +++ b/src/video_out/video_out_pgx64.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_pgx64.c,v 1.8 2002/10/12 01:34:46 komadori Exp $ + * $Id: video_out_pgx64.c,v 1.9 2002/10/13 15:39:30 jkeil Exp $ * * video_out_pgx64.c, Sun PGX64/PGX24 output plugin for xine * @@ -683,6 +683,9 @@ static pgx64_driver_t* pgx64_init_plugin(xine_t *xine, void *visual_gen) { pgx64_driver_t *this = init_plugin(xine); + if (this == NULL) + return NULL; + this->display = ((x11_visual_t*)visual_gen)->display; this->screen = ((x11_visual_t*)visual_gen)->screen; this->drawable = ((x11_visual_t*)visual_gen)->d; @@ -701,6 +704,9 @@ static pgx64_driver_t* pgx64fb_init_plugin(xine_t *xine, void *visual_gen) { pgx64_driver_t *this = init_plugin(xine); + if (this == NULL) + return NULL; + this->vo_scale.user_data = this; this->vo_scale.frame_output_cb = (void*)pgx64fb_output_callback; -- cgit v1.2.3