diff options
author | Olivier Blin <oblin@mandriva.org> | 2005-07-18 07:37:10 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2005-07-18 07:37:10 +0000 |
commit | 5e8dc9870b33434b474c99c0ded736bd39867d0f (patch) | |
tree | 78594c176a4908874f7f2a581f33eb8521025177 /perl-install/standalone | |
parent | 34b1385bbadb59ed9aff2972e697aa03867cbec0 (diff) | |
download | drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.tar drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.tar.gz drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.tar.bz2 drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.tar.xz drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.zip |
do not die if loaded file isn't an image (#16829)
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/draksplash | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash index 13dd89b22..71228c7a7 100755 --- a/perl-install/standalone/draksplash +++ b/perl-install/standalone/draksplash @@ -154,7 +154,11 @@ sub load_image { $mode = 0; @image_pixbuf = (); } - $image_pixbuf[$mode] = Gtk2::Gdk::Pixbuf->new_from_file($img); + eval { $image_pixbuf[$mode] = Gtk2::Gdk::Pixbuf->new_from_file($img) }; + if ($@) { + $in->ask_warn(N("Error"), N("Unable to load image file %s", $img)); + return; + } $image_pixbuf[$mode] = $image_pixbuf[$mode]->scale_simple($theme{res_w}, $theme{res_h}, 'hyper'); $image_pixbuf[1-$mode] or $image_pixbuf[1-$mode] = $image_pixbuf[$mode]; $image_area->queue_draw; |