Memory Management Improved
[pierogi] / keysets / nokia.cpp
index 4a3d776..56a0fad 100644 (file)
@@ -2,13 +2,24 @@
 #include "protocols/lircprotocol.h"
 
 NokiaGenericVCR::NokiaGenericVCR(
-  QObject *guiObject,
   unsigned int index)
   : PIRKeysetMetaData(
       "Generic VCR",
       Nokia_Make,
       index)
 {
+}
+
+
+void NokiaGenericVCR::populateProtocol(
+  QObject *guiObject)
+{
+  if (threadableProtocol)
+  {
+    // If the pointer is not null, the keyset must already be populated.
+    return;
+  }
+
   LIRCProtocol *lp = new LIRCProtocol(
     guiObject,
     index,