]> git.draconx.ca Git - liblbx.git/commitdiff
lbxgui: Fix an error handling regression.
authorNick Bowler <nbowler@draconx.ca>
Thu, 11 Feb 2010 13:53:56 +0000 (08:53 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 11 Feb 2010 15:22:37 +0000 (10:22 -0500)
If the framebuffer allocation fails, it still gets passed to
render_to_pixbuf.  This causes an assertion failure.

src/gui/lbxgui.c

index 2c1235aab0d3924c76a04955a586202f96dd8c39..9e462e65dd5c7df7eecc021111b267b4f7d9c86f 100644 (file)
@@ -63,7 +63,7 @@ void set_frame(GtkSpinButton *spin, gpointer data)
 {
        unsigned frame = gtk_spin_button_get_value_as_int(spin);
 
-       if (image)
+       if (image && framebuf)
                render_to_pixbuf(image, framebuf, frame);
        gdk_window_invalidate_rect(canvas->window, NULL, FALSE);
 }