Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBaseMemoryEditor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBaseMemoryEditor.cpp	(revision 79995)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBaseMemoryEditor.cpp	(revision 79996)
@@ -27,10 +27,8 @@
 #include "UIBaseMemorySlider.h"
 
-/* Other VBox includes: */
-#include "iprt/assert.h"
 
-
-UIBaseMemoryEditor::UIBaseMemoryEditor(QWidget *pParent)
+UIBaseMemoryEditor::UIBaseMemoryEditor(QWidget *pParent /* = 0 */, bool fWithLabel /* = false */)
     : QIWithRetranslateUI<QWidget>(pParent)
+    , m_fWithLabel(fWithLabel)
     , m_pLabelMemory(0)
     , m_pSlider(0)
@@ -44,34 +42,44 @@
 void UIBaseMemoryEditor::setValue(int iValue)
 {
-    AssertPtrReturnVoid(m_pSlider);
-    m_pSlider->setValue(iValue);
+    if (m_pSlider)
+        m_pSlider->setValue(iValue);
 }
 
 int UIBaseMemoryEditor::value() const
 {
-    AssertPtrReturn(m_pSlider, 0);
-    return m_pSlider->value();
+    return m_pSlider ? m_pSlider->value() : 0;
+}
+
+uint UIBaseMemoryEditor::maxRAMOpt() const
+{
+    return m_pSlider ? m_pSlider->maxRAMOpt() : 0;
+}
+
+uint UIBaseMemoryEditor::maxRAMAlw() const
+{
+    return m_pSlider ? m_pSlider->maxRAMAlw() : 0;
 }
 
 void UIBaseMemoryEditor::retranslateUi()
 {
-    AssertPtrReturnVoid(m_pSlider);
-    AssertPtrReturnVoid(m_pSpinBox);
-
-    m_pLabelMemory->setText(tr("Base &Memory:"));
-    m_pLabelMemoryMin->setText(tr("%1 MB").arg(m_pSlider->minRAM()));
-    m_pLabelMemoryMax->setText(tr("%1 MB").arg(m_pSlider->maxRAM()));
-    m_pSpinBox->setSuffix(QString(" %1").arg(tr("MB")));
+    if (m_pLabelMemory)
+        m_pLabelMemory->setText(tr("Base &Memory:"));
+    if (m_pLabelMemoryMin)
+        m_pLabelMemoryMin->setText(tr("%1 MB").arg(m_pSlider->minRAM()));
+    if (m_pLabelMemoryMax)
+        m_pLabelMemoryMax->setText(tr("%1 MB").arg(m_pSlider->maxRAM()));
+    if (m_pSpinBox)
+        m_pSpinBox->setSuffix(QString(" %1").arg(tr("MB")));
 }
 
 void UIBaseMemoryEditor::sltHandleSliderChange()
 {
-    AssertPtrReturnVoid(m_pSlider);
-    AssertPtrReturnVoid(m_pSpinBox);
-
     /* Apply spin-box value keeping it's signals disabled: */
-    m_pSpinBox->blockSignals(true);
-    m_pSpinBox->setValue(m_pSlider->value());
-    m_pSpinBox->blockSignals(false);
+    if (m_pSpinBox && m_pSlider)
+    {
+        m_pSpinBox->blockSignals(true);
+        m_pSpinBox->setValue(m_pSlider->value());
+        m_pSpinBox->blockSignals(false);
+    }
 
     /* Revalidate to send signal to listener: */
@@ -81,11 +89,11 @@
 void UIBaseMemoryEditor::sltHandleSpinBoxChange()
 {
-    AssertPtrReturnVoid(m_pSlider);
-    AssertPtrReturnVoid(m_pSpinBox);
-
     /* Apply slider value keeping it's signals disabled: */
-    m_pSlider->blockSignals(true);
-    m_pSlider->setValue(m_pSpinBox->value());
-    m_pSlider->blockSignals(false);
+    if (m_pSpinBox && m_pSlider)
+    {
+        m_pSlider->blockSignals(true);
+        m_pSlider->setValue(m_pSpinBox->value());
+        m_pSlider->blockSignals(false);
+    }
 
     /* Revalidate to send signal to listener: */
@@ -100,9 +108,11 @@
     {
         pMainLayout->setContentsMargins(0, 0, 0, 0);
+        int iRow = 0;
 
         /* Create memory label: */
-        m_pLabelMemory = new QLabel(this);
+        if (m_fWithLabel)
+            m_pLabelMemory = new QLabel(this);
         if (m_pLabelMemory)
-            pMainLayout->addWidget(m_pLabelMemory, 0, 0, 1, 1);
+            pMainLayout->addWidget(m_pLabelMemory, 0, iRow++, 1, 1);
 
         /* Create slider layout: */
@@ -146,5 +156,5 @@
 
             /* Add slider layout to main layout: */
-            pMainLayout->addLayout(pSliderLayout, 0, 1, 2, 1);
+            pMainLayout->addLayout(pSliderLayout, 0, iRow++, 2, 1);
         }
 
@@ -153,10 +163,12 @@
         if (m_pSpinBox)
         {
-            m_pLabelMemory->setBuddy(m_pSpinBox);
+            setFocusProxy(m_pSpinBox);
+            if (m_pLabelMemory)
+                m_pLabelMemory->setBuddy(m_pSpinBox);
             m_pSpinBox->setMinimum(m_pSlider->minRAM());
             m_pSpinBox->setMaximum(m_pSlider->maxRAM());
             connect(m_pSpinBox, static_cast<void(QSpinBox::*)(int)>(&QSpinBox::valueChanged),
                     this, &UIBaseMemoryEditor::sltHandleSpinBoxChange);
-            pMainLayout->addWidget(m_pSpinBox, 0, 2, 1, 1);
+            pMainLayout->addWidget(m_pSpinBox, 0, iRow++, 1, 1);
         }
     }
@@ -168,4 +180,5 @@
 void UIBaseMemoryEditor::revalidate()
 {
-    emit sigValidChanged(m_pSlider->value() < (int)m_pSlider->maxRAMAlw());
+    if (m_pSlider)
+        emit sigValidChanged(m_pSlider->value() < (int)m_pSlider->maxRAMAlw());
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBaseMemoryEditor.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBaseMemoryEditor.h	(revision 79995)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIBaseMemoryEditor.h	(revision 79996)
@@ -46,6 +46,7 @@
 public:
 
-    /** Constructs base-memory editor passing @a pParent to the base-class. */
-    UIBaseMemoryEditor(QWidget *pParent = 0);
+    /** Constructs base-memory editor passing @a pParent to the base-class.
+      * @param  fWithLabel  Brings whether we should add label ourselves. */
+    UIBaseMemoryEditor(QWidget *pParent = 0, bool fWithLabel = false);
 
     /** Defines editor @a iValue. */
@@ -53,4 +54,9 @@
     /** Returns editor value. */
     int value() const;
+
+    /** Returns the maximum optimal RAM. */
+    uint maxRAMOpt() const;
+    /** Returns the maximum allowed RAM. */
+    uint maxRAMAlw() const;
 
 protected:
@@ -74,4 +80,7 @@
     void revalidate();
 
+    /** Holds whether descriptive label should be created. */
+    bool  m_fWithLabel;
+
     /** Holds the memory label instance. */
     QLabel             *m_pLabelMemory;
