changeset 5414:871f8ebecdef

fix uninit() crash if no config() call
author arpi
date Sun, 31 Mar 2002 03:03:12 +0000
parents 2a449fba2049
children e9b15870e82f
files libvo/vo_x11.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_x11.c	Sun Mar 31 02:57:53 2002 +0000
+++ b/libvo/vo_x11.c	Sun Mar 31 03:03:12 2002 +0000
@@ -224,6 +224,7 @@
   {
    XDestroyImage( myximage );
   }
+  myximage=NULL;
 }
 
 static uint32_t config( uint32_t width,uint32_t height,uint32_t d_width,uint32_t d_height,uint32_t flags,char *title,uint32_t format,const vo_tune_info_t *info)
@@ -592,6 +593,8 @@
 static void
 uninit(void)
 {
+ if(!myximage) return;
+ 
  freeMyXImage();
  saver_on(mDisplay); // screen saver back on