[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/4.4/kdepim/blogilo/src
From:       Mehrdad Momeny <mehrdad.momeny () gmail ! com>
Date:       2010-01-18 9:23:41
Message-ID: 1263806621.323895.16307.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1076451 by momeny:

Backport of r1076447 Little fix to prevent a possible crash!


 M  +4 -1      mainwindow.cpp  
 M  +2 -1      mainwindow.h  


--- branches/KDE/4.4/kdepim/blogilo/src/mainwindow.cpp #1076450:1076451
@@ -463,7 +463,10 @@
 {
     kDebug();
     if( !widget ) {
-        widget = activePost;
+        if( activePost )
+            widget = activePost;
+        else
+            return;
     }
     DBMan::self()->removeTempEntry( *widget->currentPost() );
     tabPosts->removePage(widget);
--- branches/KDE/4.4/kdepim/blogilo/src/mainwindow.h #1076450:1076451
@@ -28,6 +28,7 @@
 #include <kxmlguiwindow.h>
 #include "bilbopost.h"
 #include "bilboblog.h"
+#include <QPointer>
 
 class KTabWidget;
 class QProgressBar;
@@ -118,7 +119,7 @@
 
     Toolbox *toolbox;
     QDockWidget *toolboxDock;
-    PostEntry *activePost;
+    QPointer<PostEntry> activePost;
     KSystemTrayIcon *systemTray;
     KTabWidget *tabPosts;
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic