Re: Crash when calling Gdk::Drawable::draw_pixbuf



Am Freitag, den 19.06.2009, 23:54 +0200 schrieb Falk Schilling:
> Dear Mark,
> 
> of course you’re right, accessing a method of a non-existing object is a
> very suboptimal idea… ^^
> 
> But nevertheless, if I do the following, I still get a segmentation
> fault when calling Gdk::Drawable::draw_pixbuf().
> 
> m_drawable = Gdk::Drawable::create();

That looks odd.  If that create() method does indeed exist, I have no
idea what it would possibly do.  Gdk::Drawable is an abstract base
class. :-)

> Maybe I have somewhere overlooked something in the documentation, but I
> assume that this is the right way to instantiate an Gdk::Drawable object.

I'm surprised that it is possible at all.  You want to instantiate a
Gdk::Pixmap, Gdk::Bitmap or Gdk::Window object, I think.

Also, are you sure Gdk::Image is really what you want to use?  This
stuff all maps directly to X11 primitives...

--Daniel




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