[Kde-imaging] [Bug 202019] New: [PATCH] Plugin_GalleryExport: mpGallery not initialized, crash on destruction if setup not called

Michael G. Hansen mhansen at mghansen.de
Thu Jul 30 19:14:13 CEST 2009


https://bugs.kde.org/show_bug.cgi?id=202019

           Summary: [PATCH] Plugin_GalleryExport: mpGallery not
                    initialized, crash on destruction if setup not called
           Product: kipiplugins
           Version: unspecified
          Platform: Debian testing
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: crash
          Priority: NOR
         Component: galleryexport
        AssignedTo: kde-imaging at kde.org
        ReportedBy: mhansen at mghansen.de


Version:           0.5 (using KDE 4.2.4)
OS:                Linux
Installed from:    Debian testing/unstable Packages

Plugin_GalleryExport::mpGallery is not initialized in the constructor, this
leads to a crash on destruction because the destructor tries to `delete
mpGallery`. The crash only appears if the plugin is loaded and
Plugin_GalleryExport::setup is not called (for example, because the application
is not using this particular plugin).

Simple patch below.

Index: galleryexport/plugin_galleryexport.cpp
===================================================================
--- galleryexport/plugin_galleryexport.cpp      (revision 1004632)
+++ galleryexport/plugin_galleryexport.cpp      (working copy)
@@ -52,7 +52,7 @@
 K_EXPORT_PLUGIN(Factory("kipiplugin_galleryexport"))

 Plugin_GalleryExport::Plugin_GalleryExport(QObject *parent, const
QVariantList&)
-                    : KIPI::Plugin(Factory::componentData(), parent,
"GalleryExport")
+                    : KIPI::Plugin(Factory::componentData(), parent,
"GalleryExport"), m_action(0), mpGallery(0)
 {
     kDebug(51001) << "Plugin_GalleryExport plugin loaded"
                   << endl;

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kde-imaging mailing list