Search
lxdream.org :: lxdream/src/drivers/video_gtk.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/drivers/video_gtk.c
changeset 530:28bdc62e642a
prev485:dfa6bd020c11
next537:d924be49e192
author nkeynes
date Mon Nov 19 08:46:30 2007 +0000 (12 years ago)
permissions -rw-r--r--
last change Handle inability to connect the X server a little more cleanly
file annotate diff log raw
1.1 --- a/src/drivers/video_gtk.c Wed Oct 31 12:43:51 2007 +0000
1.2 +++ b/src/drivers/video_gtk.c Mon Nov 19 08:46:30 2007 +0000
1.3 @@ -97,6 +97,9 @@
1.4 gboolean video_gtk_init()
1.5 {
1.6 video_win = gtk_gui_get_renderarea();
1.7 + if( video_win == NULL ) {
1.8 + return FALSE;
1.9 + }
1.10
1.11 g_signal_connect( video_win, "key_press_event",
1.12 G_CALLBACK(video_gtk_keydown_callback), NULL );
1.13 @@ -120,8 +123,10 @@
1.14
1.15 void video_gtk_shutdown()
1.16 {
1.17 - video_glx_shutdown();
1.18 - gtk_widget_destroy( GTK_WIDGET(video_win) );
1.19 + if( video_win != NULL ) {
1.20 + video_glx_shutdown();
1.21 + gtk_widget_destroy( GTK_WIDGET(video_win) );
1.22 + }
1.23
1.24 }
1.25
.