[frogr] Ensure we report to the user when a video couldn't be loaded
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Ensure we report to the user when a video couldn't be loaded
- Date: Sat, 15 Dec 2012 17:40:27 +0000 (UTC)
commit 4c1e6e37fba4f6d7f692e5272efbe44062630ad8
Author: Mario Sanchez Prada <msanchez gnome org>
Date: Sat Dec 15 18:11:14 2012 +0100
Ensure we report to the user when a video couldn't be loaded
src/frogr-file-loader.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/frogr-file-loader.c b/src/frogr-file-loader.c
index c0b41bc..0c185ee 100644
--- a/src/frogr-file-loader.c
+++ b/src/frogr-file-loader.c
@@ -583,7 +583,7 @@ _try_get_pixbuf_for_video (FrogrFileLoader *self,
GError *error = NULL;
pixbuf = frogr_util_get_pixbuf_for_video_file (file, IV_THUMB_WIDTH, IV_THUMB_HEIGHT, &error);
- if (error)
+ if (!pixbuf)
{
gchar *file_name = NULL;
gchar *msg = NULL;
@@ -599,7 +599,8 @@ _try_get_pixbuf_for_video (FrogrFileLoader *self,
frogr_util_show_error_dialog (GTK_WINDOW (FROGR_FILE_LOADER_GET_PRIVATE (self)->mainview), msg);
g_free (msg);
- g_error_free (error);
+ if (error)
+ g_error_free (error);
}
return pixbuf;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]