[Xfce4-commits] <ristretto:master> Add NULL checks to rstto_thumbnailer_dequeue_thumbnail and rstto_thumbnail_bar_remove to prevent a Segfault
Stephan Arts
noreply at xfce.org
Fri Dec 2 20:00:01 CET 2011
Updating branch refs/heads/master
to e0401b759d80569596241ec9e27f33387849ca42 (commit)
from 6339e18fad389b145669656e29d237e11ac460c9 (commit)
commit e0401b759d80569596241ec9e27f33387849ca42
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Fri Dec 2 20:56:46 2011 +0300
Add NULL checks to rstto_thumbnailer_dequeue_thumbnail and rstto_thumbnail_bar_remove to prevent a Segfault
Signed-off-by: Stephan Arts <stephan at xfce.org>
src/thumbnail_bar.c | 2 ++
src/thumbnailer.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/thumbnail_bar.c b/src/thumbnail_bar.c
index 61129e8..6e8ed18 100644
--- a/src/thumbnail_bar.c
+++ b/src/thumbnail_bar.c
@@ -664,6 +664,8 @@ rstto_thumbnail_bar_remove(GtkContainer *container, GtkWidget *child)
g_return_if_fail(GTK_IS_WIDGET(child));
+ if (bar->priv->thumbnailer == NULL)
+ return;
widget_was_visible = GTK_WIDGET_VISIBLE(child);
diff --git a/src/thumbnailer.c b/src/thumbnailer.c
index c8fcfbd..83ea2d6 100644
--- a/src/thumbnailer.c
+++ b/src/thumbnailer.c
@@ -327,6 +327,8 @@ rstto_thumbnailer_dequeue_thumbnail (
RsttoThumbnailer *thumbnailer,
RsttoThumbnail *thumb)
{
+ g_return_if_fail(thumbnailer != NULL);
+
if (thumbnailer->priv->request_timer_id)
{
g_source_remove (thumbnailer->priv->request_timer_id);
More information about the Xfce4-commits
mailing list