#! /bin/sh /usr/share/dpatch/dpatch-run
## 12_Fix_GCGraphicComponents.pm.dpatch by Alexander Wirt <formorer@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Grabbed from upstreams bts. Fixes a crash in CGraphicComponents.pm (#530821)

@DPATCH@
diff -urNad gcstar-1.4.3~/lib/gcstar/GCGraphicComponents.pm gcstar-1.4.3/lib/gcstar/GCGraphicComponents.pm
--- gcstar-1.4.3~/lib/gcstar/GCGraphicComponents.pm	2008-08-15 16:42:28.000000000 +0200
+++ gcstar-1.4.3/lib/gcstar/GCGraphicComponents.pm	2009-06-13 09:20:37.000000000 +0200
@@ -2379,6 +2379,8 @@
         
         $self->signal_connect('query_tooltip' => sub {
             my ($window, $x, $y, $keyboard_mode, $tip) = @_;
+	    return if $self->{settingTip};
+            $self->{settingTip} = 1;
             if ($self->{flipActivated} && ($x > $self->{flipX}) && ($y > $self->{flipY}))
             {
                 $self->{tooltips}->set_tip($self, $self->{flipped} ?
@@ -2389,6 +2391,7 @@
             {
                 $self->{tooltips}->set_tip($self, $self->{tip});
             }
+            $self->{settingTip} = 0;
             return 0;
         });
