Commit 0846c5daee0bfa6f304e278125a096c710c3c43c
1 parent
deb3894c
Exists in
master
and in
5 other branches
Corrigindo leak na imagem de logotipo
Showing
1 changed file
with
6 additions
and
2 deletions
Show diff stats
src/gtk/dialog.c
@@ -542,12 +542,16 @@ | @@ -542,12 +542,16 @@ | ||
542 | 542 | ||
543 | if(logo && g_file_test(filename,G_FILE_TEST_EXISTS)) | 543 | if(logo && g_file_test(filename,G_FILE_TEST_EXISTS)) |
544 | { | 544 | { |
545 | - GError *error = NULL; | 545 | + GError * error = NULL; |
546 | GdkPixbuf * pix = gdk_pixbuf_new_from_file(filename,&error); | 546 | GdkPixbuf * pix = gdk_pixbuf_new_from_file(filename,&error); |
547 | 547 | ||
548 | gtk_about_dialog_set_logo(dialog,pix); | 548 | gtk_about_dialog_set_logo(dialog,pix); |
549 | 549 | ||
550 | - if(!pix) | 550 | + if(pix) |
551 | + { | ||
552 | + g_object_unref(pix); | ||
553 | + } | ||
554 | + else | ||
551 | { | 555 | { |
552 | g_warning("Can't load %s: %s",filename,error->message); | 556 | g_warning("Can't load %s: %s",filename,error->message); |
553 | g_error_free(error); | 557 | g_error_free(error); |