diff options
author | David Tardon <dtardon@redhat.com> | 2011-05-24 06:30:46 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-05-24 06:33:25 +0200 |
commit | 2daa098c3c1b49ce4d46306eddc45f7a66b7c021 (patch) | |
tree | a1bce59fc664c012791327990fd13794a2de04d6 /desktop/unx/source/splashx.c | |
parent | dd051d725eff94873ed16ebcb16a7b7072f16069 (diff) |
handle NULL display gracefully
Diffstat (limited to 'desktop/unx/source/splashx.c')
-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 a8a87b0adbdf..dc88343a8c65 100755 --- a/desktop/unx/source/splashx.c +++ b/desktop/unx/source/splashx.c @@ -574,6 +574,9 @@ static void process_events() // Draw the progress void splash_draw_progress( int progress ) { + if (!display) + return; + // sanity if ( progress < 0 ) progress = 0; @@ -604,7 +607,8 @@ void splash_draw_progress( int progress ) // Close the window & cleanup void splash_close_window() { - XCloseDisplay( display ); + if (display) + XCloseDisplay( display ); #ifdef USE_LIBPNG png_destroy_read_struct( &png_ptr, &info_ptr, NULL ); #else |