--- rxvt-unicode/src/rxvtutil.h 2012/05/25 07:48:03 1.55 +++ rxvt-unicode/src/rxvtutil.h 2012/05/25 18:49:59 1.57 @@ -110,7 +110,7 @@ explicit auto_ptr (T *a) : p (a) { } - auto_ptr (auto_ptr &a) + auto_ptr (auto_ptr &a) { p = a.p; a.p = 0; @@ -137,15 +137,13 @@ // void because it makes sense in our context void operator =(auto_ptr &a) { - *this = a.p; - a.p = 0; + reset (a.release ()); } template void operator =(auto_ptr &a) { - *this = a.p; - a.p = 0; + reset (a.release ()); } T *operator ->() const { return p; }