--------------Boundary-00=_4VDW88FGPQ75HBWJJZIU Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi all, Viewing an empty history crashes Kopete. I traced it back to kopetehistorywidget.cpp: FILE *f =3D fopen(logFileName, "r"); if (f =3D=3D NULL) { // Oops, no file messages =3D 0; } else { messages =3D countMessages(); } fclose( f ); // <-- Crashes when f =3D=3D NULL Patch attached :-) --=20 Andy Goossens -- andygoossens at softhome dot net "Use the Source, Luke..." --------------Boundary-00=_4VDW88FGPQ75HBWJJZIU Content-Type: text/x-diff; charset="us-ascii"; name="history.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="history.patch" Index: kopetehistorywidget.cpp =================================================================== RCS file: /home/kdecvs/kde/kdenonbeta/kopete/libkopete/ui/kopetehistorywidget.cpp,v retrieving revision 1.2 diff -u -3 -p -r1.2 kopetehistorywidget.cpp --- kopetehistorywidget.cpp 4 May 2002 14:40:21 -0000 1.2 +++ kopetehistorywidget.cpp 10 May 2002 13:22:43 -0000 @@ -160,9 +160,8 @@ void KopeteHistoryWidget::init() else { messages = countMessages(); + fclose( f ); } - - fclose( f ); if ( messages == 0 ) { --------------Boundary-00=_4VDW88FGPQ75HBWJJZIU-- _______________________________________________ Kopete-devel mailing list Kopete-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/kopete-devel