dial back nullPtr usage

while it still remains a good idea to port as many NULL compares and assignments over to nullPtr as feasable, we do still need to sort out how to better support scripted empty, false, and zero assigns for things like objectIDs.

this means we'll need to both fully convert the backend of the parser to support that kind of thing, but also alter most if not all exisiting NULLs. up to and including things like SAFE_DELETE. while that's certainly feasable, given there's aproximatel 400 nullptr assigns/checks prior to this commit, and roughly 1800 of the prior, if it terminates in a script call and not an aip one direct, we'll be dialing that back until such time as fork fully fopcused on converting and resolving any lingering mismatches is completed.
This commit is contained in:
AzaezelX 2025-12-29 17:45:09 -06:00
parent e9205027f7
commit 5ffa3b81f1
84 changed files with 319 additions and 319 deletions

View file

@ -215,7 +215,7 @@ void GuiDragAndDropControl::onMouseDragged( const GuiEvent& event )
// Allow the control under the drag to react to a potential drop
GuiControl* enterTarget = findDragTarget( event.mousePoint, "onControlDragEnter" );
if(enterTarget != nullptr)
if(enterTarget != NULL)
Con::printf("GuiDragAndDropControl::onMouseDragged() - enterTarget: %d", enterTarget->getId());
if( mLastTarget != enterTarget )

View file

@ -1033,7 +1033,7 @@ void GuiGameListMenuCtrl::clearRows()
for (U32 i = 0; i < mRows.size(); i++)
{
if (mRows[i]->mBitmap != StringTable->EmptyString())
mRows[i]->mBitmapTex = nullptr;
mRows[i]->mBitmapTex = NULL;
}
mRows.clear();

View file

@ -86,7 +86,7 @@ protected:
GFXTexHandle mBitmapTex;
Row() : mLabel(StringTable->EmptyString()), mScriptCallback(StringTable->EmptyString()), mTooltip(StringTable->EmptyString()), mIconIndex(-1), mHeightPad(0), mUseHighlightIcon(false), mEnabled(true),
mSelectedOption(0), mWrapOptions(false), mMode(Mode::Default), mValue(0), mStepSize(1), mRange(Point2F(0, 1)), mBitmap(StringTable->EmptyString()), mBitmapTex(nullptr)
mSelectedOption(0), mWrapOptions(false), mMode(Mode::Default), mValue(0), mStepSize(1), mRange(Point2F(0, 1)), mBitmap(StringTable->EmptyString()), mBitmapTex(NULL)
{
VECTOR_SET_ASSOCIATION(mOptions);
}

View file

@ -278,7 +278,7 @@ GuiMLTextCtrl::GuiMLTextCtrl()
mTypeOverTimeSpeedMS(10),
mTypeOverTimeIndex(0),
mTypeoutSoundRate(-1),
mTypeoutSound(nullptr)
mTypeoutSound(NULL)
{
mActive = true;
//mInitialText = StringTable->EmptyString();

View file

@ -338,7 +338,7 @@ GuiPopUpMenuCtrlEx::GuiPopUpMenuCtrlEx(void)
mSc = NULL;
mReplaceText = false;
mTextSearchItems = false;
mSearchEdit = nullptr;
mSearchEdit = NULL;
}
//------------------------------------------------------------------------------

View file

@ -4540,7 +4540,7 @@ void GuiTreeViewCtrl::reparentItems(Vector<Item*> selectedItems, Item* newParent
// Snag the current parent set if any for future reference
SimSet * parentSet = NULL;
if (oldParent != nullptr && oldParent->isInspectorData())
if (oldParent != NULL && oldParent->isInspectorData())
{
parentSet = dynamic_cast<SimSet*>(oldParent->getObject());
}
@ -4872,7 +4872,7 @@ void GuiTreeViewCtrl::reparentItems(Vector<Item*> selectedItems, Item* newParent
S32 GuiTreeViewCtrl::getTabLevel(S32 itemId)
{
Item* item = getItem(itemId);
if (item != nullptr)
if (item != NULL)
{
return item->mTabLevel;
}
@ -5745,7 +5745,7 @@ DefineEngineMethod(GuiTreeViewCtrl, reparentItem, void, (S32 itemId, S32 parentI
const Vector< GuiTreeViewCtrl::Item* > & selectedItems = object->getItems();
Vector<GuiTreeViewCtrl::Item*> items;
GuiTreeViewCtrl::Item * parent = nullptr;
GuiTreeViewCtrl::Item * parent = NULL;
for (S32 i = 0; i < selectedItems.size(); ++i)
{
@ -5760,7 +5760,7 @@ DefineEngineMethod(GuiTreeViewCtrl, reparentItem, void, (S32 itemId, S32 parentI
}
}
if (!items.empty() && parent != nullptr)
if (!items.empty() && parent != NULL)
{
object->reparentItems(items, parent);
}

View file

@ -162,8 +162,8 @@ GuiCanvas::GuiCanvas(): GuiControl(),
mLastRenderMs(0),
mPlatformWindow(NULL),
mDisplayWindow(true),
mMenuBarCtrl(nullptr),
mMenuBackground(nullptr),
mMenuBarCtrl(NULL),
mMenuBackground(NULL),
mConstrainMouse(false)
{
setBounds(0, 0, 640, 480);
@ -359,7 +359,7 @@ void GuiCanvas::setMenuBar(SimObject *obj)
return;
}
if (mMenuBackground == nullptr)
if (mMenuBackground == NULL)
{
mMenuBackground = new GuiControl();
mMenuBackground->registerObject();

View file

@ -199,7 +199,7 @@ bool GuiControlProfile::protectedSetBitmap( void *object, const char *index, con
if( profile->mLoadCount > 0 )
{
profile->mBitmapArrayRects.clear();
profile->mBitmap = nullptr;
profile->mBitmap = NULL;
if (profile->mBitmapName != StringTable->EmptyString())
{

View file

@ -803,7 +803,7 @@ void GuiInspector::sendInspectPostApply()
S32 GuiInspector::createInspectorGroup(StringTableEntry groupName, S32 index)
{
GuiInspectorGroup* newGroup = nullptr;
GuiInspectorGroup* newGroup = NULL;
newGroup = findExistentGroup(groupName);
if (newGroup)
return newGroup->getId(); //if we already have a group under this name, just return it
@ -830,7 +830,7 @@ S32 GuiInspector::createInspectorGroup(StringTableEntry groupName, S32 index)
void GuiInspector::removeInspectorGroup(StringTableEntry groupName)
{
GuiInspectorGroup* group = findExistentGroup(groupName);
if (group == nullptr)
if (group == NULL)
return;
mGroups.remove(group);

View file

@ -87,7 +87,7 @@ public:
if (!mTargets.empty())
return mTargets[index];
else
return nullptr;
return NULL;
}
S32 getComponentGroupTargetId() { return mComponentGroupTargetId; }

View file

@ -180,7 +180,7 @@ void GuiMenuBar::onRemove()
if (Sim::findObject("PopUpMenuControl", backgroundCtrl))
{
if (backgroundCtrl->mMenuBarCtrl == this)
backgroundCtrl->mMenuBarCtrl = nullptr;
backgroundCtrl->mMenuBarCtrl = NULL;
}
Parent::onRemove();
@ -310,7 +310,7 @@ void GuiMenuBar::onMouseMove(const GuiEvent &event)
{
MenuEntry *hit = findHitMenu(event.mousePoint);
if (mouseDownMenu != nullptr && hit != nullptr)
if (mouseDownMenu != NULL && hit != NULL)
{
//we have a standing click, so just update and go
mouseDownMenu = mouseOverMenu = hit;
@ -526,15 +526,15 @@ void GuiMenuBar::processTick()
void GuiMenuBar::insert(SimObject* pObject, S32 pos)
{
PopupMenu* menu = nullptr;
if (pObject != nullptr)
PopupMenu* menu = NULL;
if (pObject != NULL)
{
menu = dynamic_cast<PopupMenu*>(pObject);
}
if (menu == nullptr)
if (menu == NULL)
{
if (pObject != nullptr)
if (pObject != NULL)
{
Con::errorf("GuiMenuBar::insert() - attempted to insert non-popupMenu object: %d", pObject->getId());
}
@ -564,15 +564,15 @@ void GuiMenuBar::insert(SimObject* pObject, S32 pos)
void GuiMenuBar::remove(SimObject* pObject)
{
PopupMenu* menu = nullptr;
if (pObject != nullptr)
PopupMenu* menu = NULL;
if (pObject != NULL)
{
menu = dynamic_cast<PopupMenu*>(pObject);
}
if (menu == nullptr)
if (menu == NULL)
{
if (pObject != nullptr)
if (pObject != NULL)
{
Con::errorf("GuiMenuBar::insert() - attempted to insert non-popupMenu object: %d", pObject->getId());
}
@ -597,7 +597,7 @@ void GuiMenuBar::remove(SimObject* pObject)
PopupMenu* GuiMenuBar::getMenu(U32 index)
{
if (index >= mMenuList.size())
return nullptr;
return NULL;
return mMenuList[index].popupMenu;
}
@ -610,7 +610,7 @@ PopupMenu* GuiMenuBar::findMenu(String barTitle)
return mMenuList[i].popupMenu;
}
return nullptr;
return NULL;
}
//-----------------------------------------------------------------------------
@ -631,7 +631,7 @@ DefineEngineMethod(GuiMenuBar, removeFromCanvas, void, (), , "()")
GuiCanvas* canvas = object->getRoot();
if(canvas)
canvas->setMenuBar(nullptr);
canvas->setMenuBar(NULL);
}
#endif
@ -648,7 +648,7 @@ DefineEngineMethod(GuiMenuBar, getMenu, S32, (S32 index), (0), "(Index)")
//-----------------------------------------------------------------------------
DefineEngineMethod(GuiMenuBar, insert, void, (SimObject* pObject, S32 pos), (nullAsType<SimObject*>(), -1), "(object, pos) insert object at position")
{
if(pObject == nullptr)
if(pObject == NULL)
{
Con::errorf("GuiMenuBar::insert() - null object");
return;
@ -658,7 +658,7 @@ DefineEngineMethod(GuiMenuBar, insert, void, (SimObject* pObject, S32 pos), (nul
DefineEngineMethod(GuiMenuBar, remove, void, (SimObject* pObject), (nullAsType<SimObject*>()), "(object, pos) remove object")
{
if (pObject == nullptr)
if (pObject == NULL)
{
Con::errorf("GuiMenuBar::remove() - null object");
return;

View file

@ -27,7 +27,7 @@
GuiPopupMenuBackgroundCtrl::GuiPopupMenuBackgroundCtrl()
{
mMenuBarCtrl = nullptr;
mMenuBarCtrl = NULL;
}
void GuiPopupMenuBackgroundCtrl::onMouseDown(const GuiEvent &event)
@ -62,7 +62,7 @@ void GuiPopupMenuBackgroundCtrl::close()
if(getRoot())
getRoot()->removeObject(this);
mMenuBarCtrl = nullptr;
mMenuBarCtrl = NULL;
}
S32 GuiPopupMenuBackgroundCtrl::findPopupMenu(PopupMenu* menu)
@ -91,8 +91,8 @@ GuiPopupMenuTextListCtrl::GuiPopupMenuTextListCtrl()
{
isSubMenu = false; // Added
mMenuBar = nullptr;
mPopup = nullptr;
mMenuBar = NULL;
mPopup = NULL;
mLastHighlightedMenuIdx = -1;
mBackground = NULL;
@ -284,7 +284,7 @@ void GuiPopupMenuTextListCtrl::onCellHighlighted(Point2I cell)
{
MenuItem *list = &mPopup->mMenuItems[selectionIndex];
if (list->mIsSubmenu && list->mSubMenu != nullptr)
if (list->mIsSubmenu && list->mSubMenu != NULL)
{
list->mSubMenu->showPopup(getRoot(), getPosition().x + mCellSize.x, getPosition().y + (selectionIndex * mCellSize.y));
}

View file

@ -570,7 +570,7 @@ bool GuiShapeEdPreview::mountShape(const char* shapeAssetId, const char* nodeNam
ShapeAsset* model = AssetDatabase.acquireAsset<ShapeAsset>(shapeAssetId);
if (model == nullptr || !model->getShapeResource())
if (model == NULL || !model->getShapeResource())
return false;
TSShapeInstance* tsi = new TSShapeInstance(model->getShapeResource(), true );

View file

@ -269,7 +269,7 @@ void GuiInspectorField::setWordData(const S32& wordIndex, const char* data, bool
if (mSpecialEditField)
{
if (mTargetObject != nullptr && mVariableName != StringTable->EmptyString())
if (mTargetObject != NULL && mVariableName != StringTable->EmptyString())
{
const char* fieldData = mTargetObject->getDataField(mVariableName, NULL);
const char* wordData = StringUnit::getUnit(fieldData, wordIndex, " \t\n");
@ -495,7 +495,7 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
{
if (mSpecialEditField)
{
if (mTargetObject != nullptr && mVariableName != StringTable->EmptyString())
if (mTargetObject != NULL && mVariableName != StringTable->EmptyString())
{
mTargetObject->setDataField(mVariableName, NULL, data);
@ -645,7 +645,7 @@ const char* GuiInspectorField::getData( U32 inspectObjectIndex )
}
else
{
if (mTargetObject != nullptr && mVariableName != StringTable->EmptyString())
if (mTargetObject != NULL && mVariableName != StringTable->EmptyString())
{
return mTargetObject->getDataField(mVariableName, NULL);
}
@ -911,7 +911,7 @@ void GuiInspectorField::_registerEditControl(GuiControl* ctrl, StringTableEntry
ctrl->setInternalName(suffix);
char szName[512];
if (mInspector->getInspectObject() != nullptr)
if (mInspector->getInspectObject() != NULL)
dSprintf(szName, 512, "IE_%s_%d_%s_%s_Field", ctrl->getClassName(), mInspector->getInspectObject()->getId(), suffix, mCaption);
else
dSprintf(szName, 512, "IE_%s_%s_%s_Field", ctrl->getClassName(), suffix, mCaption);

View file

@ -696,7 +696,7 @@ void GuiInspectorGroup::addInspectorField(StringTableEntry name, StringTableEntr
else
fieldGui = constructField(fieldType);
if (fieldGui == nullptr)
if (fieldGui == NULL)
{
//call down into script and see if there's special handling for that type of field
//this allows us to have completely special-case field types implemented entirely in script
@ -750,7 +750,7 @@ void GuiInspectorGroup::removeInspectorField(StringTableEntry name)
{
GuiInspectorField* field = dynamic_cast<GuiInspectorField*>(mStack->getObject(i));
if (field == nullptr)
if (field == NULL)
continue;
if (field->getFieldName() == name || field->getSpecialEditVariableName() == name)
@ -764,7 +764,7 @@ void GuiInspectorGroup::removeInspectorField(StringTableEntry name)
void GuiInspectorGroup::hideInspectorField(StringTableEntry fieldName, bool setHidden)
{
SimObject* inspectObj = mParent->getInspectObject();
if (inspectObj == nullptr)
if (inspectObj == NULL)
return;
AbstractClassRep::Field* field = const_cast<AbstractClassRep::Field*>(inspectObj->getClassRep()->findField(fieldName));
@ -787,7 +787,7 @@ void GuiInspectorGroup::replaceInspectorField(StringTableEntry fieldName, GuiIns
{
GuiInspectorField* field = dynamic_cast<GuiInspectorField*>(mStack->getObject(i));
if (field == nullptr)
if (field == NULL)
continue;
if (field->getFieldName() == fieldName || field->getSpecialEditVariableName() == fieldName)
@ -878,7 +878,7 @@ DefineEngineMethod(GuiInspectorGroup, findField, S32, (const char* fieldName),,
return 0;
GuiInspectorField* field = object->findField(StringTable->insert(fieldName));
if (field == nullptr)
if (field == NULL)
return 0;
return field->getId();

View file

@ -97,7 +97,7 @@ bool GuiInspectorVariableField::onAdd()
void GuiInspectorVariableField::setData( const char* data, bool callbacks )
{
if (mOwnerObject == nullptr && mVariableName == StringTable->EmptyString())
if (mOwnerObject == NULL && mVariableName == StringTable->EmptyString())
{
if (!mCaption || mCaption[0] == 0)
return;
@ -106,7 +106,7 @@ void GuiInspectorVariableField::setData( const char* data, bool callbacks )
}
else
{
if (mOwnerObject != nullptr)
if (mOwnerObject != NULL)
{
//Special case: if our object is a Settings class, we'll assume that we're trying to get/set the fields via the Setting class's normal behavior
//otherwise, use fields as normal

View file

@ -72,7 +72,7 @@ void GuiVariableInspector::update()
for (U32 i = 0; i < mFields.size(); i++)
{
//first, get the var's group name. if the group exists, we'll add to it's list
GuiInspectorVariableGroup *group = nullptr;
GuiInspectorVariableGroup *group = NULL;
for (U32 g = 0; g < mGroups.size(); g++)
{
@ -83,7 +83,7 @@ void GuiVariableInspector::update()
}
}
if (group == nullptr)
if (group == NULL)
{
group = new GuiInspectorVariableGroup();
@ -164,7 +164,7 @@ void GuiVariableInspector::addField(const char* name, const char* label, const c
//establish the field on the ownerObject(if we have one)
//This way, we can let the field hook into the object's field and modify it when changed
if (newField->mOwnerObject != nullptr)
if (newField->mOwnerObject != NULL)
{
if (!newField->mOwnerObject->isField(newField->mFieldName))
{

View file

@ -47,7 +47,7 @@ public:
PopupMenu::PopupMenu()
{
mMenuItems = 0;
mMenuBarCtrl = nullptr;
mMenuBarCtrl = NULL;
mBarTitle = StringTable->EmptyString();
mBounds = RectI(0, 0, 64, 64);
@ -57,7 +57,7 @@ PopupMenu::PopupMenu()
mDrawBitmapOnly = false;
mDrawBorder = false;
mTextList = nullptr;
mTextList = NULL;
mIsSubmenu = false;
@ -168,8 +168,8 @@ S32 PopupMenu::insertItem(S32 pos, const char *title, const char* accelerator, c
newItem.mEnabled = !newItem.mIsSpacer;
newItem.mIsSubmenu = false;
newItem.mSubMenu = nullptr;
newItem.mSubMenuParentMenu = nullptr;
newItem.mSubMenu = NULL;
newItem.mSubMenuParentMenu = NULL;
mMenuItems.push_back(newItem);
@ -308,7 +308,7 @@ void PopupMenu::showPopup(GuiCanvas *owner, S32 x /* = -1 */, S32 y /* = -1 */)
if (!profile)
return;
if (mTextList == nullptr)
if (mTextList == NULL)
{
mTextList = new GuiPopupMenuTextListCtrl();
mTextList->registerObject();
@ -350,7 +350,7 @@ void PopupMenu::showPopup(GuiCanvas *owner, S32 x /* = -1 */, S32 y /* = -1 */)
owner->pushDialogControl(backgroundCtrl, 10);
//Set the background control's menubar, if any, and if it's not already set
if(backgroundCtrl->mMenuBarCtrl == nullptr)
if(backgroundCtrl->mMenuBarCtrl == NULL)
backgroundCtrl->mMenuBarCtrl = getMenuBarCtrl();
backgroundCtrl->setExtent(owner->getExtent());
@ -473,7 +473,7 @@ void PopupMenu::hidePopupSubmenus()
{
for (U32 i = 0; i < mMenuItems.size(); i++)
{
if (mMenuItems[i].mSubMenu != nullptr)
if (mMenuItems[i].mSubMenu != NULL)
mMenuItems[i].mSubMenu->hidePopup();
}
}

View file

@ -781,7 +781,7 @@ GuiShaderNode* GuiShaderEditor::findHitNode(const Point2I& pt)
}
}
return nullptr;
return NULL;
}
bool GuiShaderEditor::findHitSocket(const Point2I& pt)
@ -929,7 +929,7 @@ bool GuiShaderEditor::hasConnection(NodeSocket* inSocket, NodeConnection*& conn)
{
if (con->inSocket == dynamic_cast<NodeInput*>(inSocket) || con->outSocket == dynamic_cast<NodeOutput*>(inSocket))
{
if (conn != nullptr)
if (conn != NULL)
conn = con;
return true;
}

View file

@ -65,7 +65,7 @@ GuiInputCtrl::GuiInputCtrl()
mSendModifierEvents(false),
mIgnoreMouseEvents(false)
{
mActionmap = nullptr;
mActionmap = NULL;
}
//------------------------------------------------------------------------------
@ -123,7 +123,7 @@ bool GuiInputCtrl::onWake()
if( !smDesignTime && !mIgnoreMouseEvents)
mouseLock();
if(mActionmap != nullptr)
if(mActionmap != NULL)
{
if (getRoot()->isActive())
{
@ -144,7 +144,7 @@ void GuiInputCtrl::onSleep()
Parent::onSleep();
mouseUnlock();
if (mActionmap != nullptr)
if (mActionmap != NULL)
{
SimSet* actionMapSet = Sim::getActiveActionMapSet();
actionMapSet->removeObject(mActionmap);
@ -174,7 +174,7 @@ void GuiInputCtrl::setActive(bool value)
void GuiInputCtrl::handleCanvasSetActive(GuiCanvas* canvas, bool isActive)
{
if (mActionmap == nullptr)
if (mActionmap == NULL)
return;
if (getRoot() == canvas)
@ -231,7 +231,7 @@ bool GuiInputCtrl::onInputEvent( const InputEventInfo &event )
if (mIgnoreMouseEvents && event.deviceType == MouseDeviceType)
return false;
if (mActionmap != nullptr)
if (mActionmap != NULL)
return false;
char deviceString[32];

View file

@ -60,10 +60,10 @@ GuiRenderTargetVizCtrl::GuiRenderTargetVizCtrl()
{
mTargetName = StringTable->EmptyString();
mTarget = nullptr;
mTargetTexture = nullptr;
mTarget = NULL;
mTargetTexture = NULL;
mCameraObject = nullptr;
mCameraObject = NULL;
}
//-----------------------------------------------------------------------------
@ -97,7 +97,7 @@ void GuiRenderTargetVizCtrl::onRender(Point2I offset,
//Draw backdrop
GFX->getDrawUtil()->drawRectFill(boundsRect, ColorI::BLACK);
if (mCameraObject != nullptr)
if (mCameraObject != NULL)
{
Camera* camObject = dynamic_cast<Camera*>(mCameraObject);

View file

@ -172,7 +172,7 @@ void GuiConvexEditorCtrl::setVisible( bool val )
}
Scene* scene = Scene::getRootScene();
if (scene != nullptr)
if (scene != NULL)
{
//Make our proxy objects "real" again
for (U32 i = 0; i < mProxyObjects.size(); ++i)
@ -228,7 +228,7 @@ void GuiConvexEditorCtrl::setVisible( bool val )
mSavedGizmoFlags = mGizmoProfile->flags;
Scene* scene = Scene::getRootScene();
if (scene != nullptr)
if (scene != NULL)
{
for (U32 c = 0; c < scene->size(); ++c)
{

View file

@ -1888,7 +1888,7 @@ WorldEditor::WorldEditor()
mFadeIcons = true;
mFadeIconsDist = 8.f;
mActiveEditorTool = nullptr;
mActiveEditorTool = NULL;
}
WorldEditor::~WorldEditor()
@ -1982,7 +1982,7 @@ void WorldEditor::on3DMouseMove(const Gui3DMouseEvent & event)
mHitObject = NULL;
//If we have an active tool and it's intercepted our input, bail out
if (mActiveEditorTool != nullptr && mActiveEditorTool->onMouseMove(event))
if (mActiveEditorTool != NULL && mActiveEditorTool->onMouseMove(event))
return;
//
@ -2014,7 +2014,7 @@ void WorldEditor::on3DMouseMove(const Gui3DMouseEvent & event)
void WorldEditor::on3DMouseDown(const Gui3DMouseEvent & event)
{
//If we have an active tool and it's intercepted our input, bail out
if (mActiveEditorTool != nullptr && mActiveEditorTool->onMouseDown(event))
if (mActiveEditorTool != NULL && mActiveEditorTool->onMouseDown(event))
return;
mMouseDown = true;
@ -2085,7 +2085,7 @@ void WorldEditor::on3DMouseDown(const Gui3DMouseEvent & event)
void WorldEditor::on3DMouseUp( const Gui3DMouseEvent &event )
{
//If we have an active tool and it's intercepted our input, bail out
if (mActiveEditorTool != nullptr && mActiveEditorTool->onMouseUp(event))
if (mActiveEditorTool != NULL && mActiveEditorTool->onMouseUp(event))
return;
const bool wasUsingAxisGizmo = mUsingAxisGizmo;
@ -2249,7 +2249,7 @@ void WorldEditor::on3DMouseUp( const Gui3DMouseEvent &event )
void WorldEditor::on3DMouseDragged(const Gui3DMouseEvent & event)
{
//If we have an active tool and it's intercepted our input, bail out
if (mActiveEditorTool != nullptr && mActiveEditorTool->onMouseDragged(event))
if (mActiveEditorTool != NULL && mActiveEditorTool->onMouseDragged(event))
return;
if ( !mMouseDown )
@ -2488,7 +2488,7 @@ void WorldEditor::renderScene( const RectI &updateRect )
smRenderSceneSignal.trigger(this);
if (mActiveEditorTool != nullptr)
if (mActiveEditorTool != NULL)
mActiveEditorTool->render();
// Grab this before anything here changes it.