From c88464e62aefb104f59391162b8e39da6041d37a Mon Sep 17 00:00:00 2001 From: daniel0916 Date: Sun, 13 Apr 2014 13:36:03 +0200 Subject: [PATCH] Fixed Server Crash --- src/ClientHandle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 2d068ea07..a5ce510a3 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -2690,6 +2690,12 @@ void cClientHandle::SocketClosed(void) void cClientHandle::HandleEnchantItem(Byte & WindowID, Byte & Enchantment) { cItem Item = m_Player->GetDraggingItem(); + + if (!cItem::IsEnchantable(Item.m_ItemType)) + { + return; + } + cEnchantingWindow * Window = (cEnchantingWindow*)m_Player->GetWindow(); int BaseEnchantmentLevel = Window->GetPropertyValue(Enchantment);