Re: gdk (glib?) error



I changed the code as follows:


  GdkPixbuf *icon;
  GError *error = NULL;

  icon = gdk_pixbuf_new_from_file ("test.png", &error);
  if (icon == NULL)
    printf ("%s\n", error->message);
  else
    printf ("No error!\n");

The error is still the same. Even with this

  GdkPixbuf *icon;
  GError *error = NULL;
  error = (GError *) malloc (sizeof (GError));

  icon = gdk_pixbuf_new_from_file ("test.png", &error);
  if (icon == NULL)
    printf ("%s\n", error->message);
  else
    printf ("No error!\n");


which is totaly pointless in my opinion, the code doesn't work. I don't know
how.

-- 
Simon Fuhrmann | NightSlayer gmx de | www.dismember.de

GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]