From kde-commits Sun Mar 14 17:38:37 2004 From: Christoph Cullmann Date: Sun, 14 Mar 2004 17:38:37 +0000 To: kde-commits Subject: KDE_3_2_BRANCH: kdebase/kate/app Message-Id: <20040314173837.5025299A8 () office ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=107928592204469 CVS commit by cullmann: fix session restore prob, bug #76893 M +5 -0 kwritemain.cpp 1.93.2.2 M +2 -0 kwritemain.h 1.26.2.1 --- kdebase/kate/app/kwritemain.cpp #1.93.2.1:1.93.2.2 @@ -645,4 +645,9 @@ extern "C" int kdemain(int argc, char ** } + // no window there, uh, ohh, for example borked session config !!! + // create at least one !! + if (KWrite::noWindows()) + new KWrite(); + return a.exec (); } --- kdebase/kate/app/kwritemain.h #1.26:1.26.2.1 @@ -48,4 +48,6 @@ class KWrite : public KParts::MainWindow KTextEditor::View *view() const { return m_view; } + static bool noWindows () { return winList.isEmpty(); } + private: void setupActions();