[Libreoffice-commits] .: Branch 'libreoffice-3-4' - desktop/unx

Bjoern Michaelsen bmichaelsen at kemper.freedesktop.org
Thu Sep 15 10:06:26 PDT 2011


 desktop/unx/source/splashx.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 253ff23c3a93b5ea45a2451a8bc97fca19856a75
Author: David Tardon <dtardon at redhat.com>
Date:   Tue May 24 06:30:46 2011 +0200

    handle NULL display gracefully
    
    (cherry-picked from core 2daa098c3c1b49ce4d46306eddc45f7a66b7c021)
    
    Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index 4f5d4b2..e975733 100755
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -589,6 +589,9 @@ static void process_events()
 // Draw the progress
 void splash_draw_progress( int progress )
 {
+    if (!display)
+        return;
+
     // sanity
     if ( progress < 0 )
         progress = 0;
@@ -619,7 +622,8 @@ void splash_draw_progress( int progress )
 // Close the window & cleanup
 void splash_close_window()
 {
-    XCloseDisplay( display );
+    if (display)
+        XCloseDisplay( display );
     display = NULL;
 #ifdef USE_LIBPNG
     png_destroy_read_struct( &png_ptr, &info_ptr, NULL );


More information about the Libreoffice-commits mailing list