diff options
author | David Tardon <dtardon@redhat.com> | 2011-05-24 06:30:46 +0200 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2011-09-15 19:03:46 +0200 |
commit | 253ff23c3a93b5ea45a2451a8bc97fca19856a75 (patch) | |
tree | 37d3f728cb82c3cb7d5c270fb97688ee1a9ce46c | |
parent | 14bc9100d36eae3999f1623efce8ee84091da842 (diff) |
handle NULL display gracefully
(cherry-picked from core 2daa098c3c1b49ce4d46306eddc45f7a66b7c021)
Signed-off-by: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
-rwxr-xr-x | desktop/unx/source/splashx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c index 4f5d4b217a..e975733e15 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 ); |